added optional logo as JSX.Element
This commit is contained in:
parent
361bf0fd2a
commit
eeb959bda1
@ -3,6 +3,7 @@ import React, {Component} from 'react';
|
|||||||
type CardProps = {
|
type CardProps = {
|
||||||
title: string,
|
title: string,
|
||||||
content: string,
|
content: string,
|
||||||
|
logo?: JSX.Element,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -13,8 +14,8 @@ export class SidebarCard extends Component<CardProps> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="bg-gray-300 mt-2 mx-4 rounded p-4">
|
<div className="bg-gray-300 mt-2 mx-2 rounded p-2 flex flex-col items-center">
|
||||||
<div className="text-gray-600">{this.props.title}</div>
|
<div className="text-gray-600">{this.props.logo} {this.props.title}</div>
|
||||||
<div className="mt-1 mx-auto text-center text-3xl font-semibold">{this.props.content}</div>
|
<div className="mt-1 mx-auto text-center text-3xl font-semibold">{this.props.content}</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user