import React from 'react'; import { Box, Icon, Row } from '@tlon/indigo-react'; import './Card.scss'; export interface CardProps { icon?: typeof Icon; title?: string; subtitle?: string; warning?: string; onClick?: () => void; disabled?: boolean; children?: React.ReactNode; } export default function Card({ icon, title, subtitle, warning, onClick, children, disabled = false, }: CardProps) { return ( {(!!icon || !!title) && ( {!!icon && icon} {!!title && {title}} )} {!!subtitle && {subtitle}} {children} {!!warning && ( {warning} )} ); }