import React from 'react';
import cn from 'classnames';
type CardProps = {
heading: string;
icon?: 'book' | 'clock' | 'graph' | 'user';
bodyText: string;
children: React.ReactNode;
};
// Temporary approach. @todo remove after implementing icons
const Icon = props => {
switch (props.icon) {
case 'book':
return (
);
case 'clock':
return (
);
case 'graph':
return (
);
case 'user':
return (
);
}
};
export const Card: React.FC = ({
heading,
icon,
bodyText,
children,
}: CardProps) => {
const classes = cn('bfo-card');
return (
{icon && (
)}
{heading &&
{heading}
}
{bodyText &&
{bodyText}
}
{children &&
{children}
}
);
};