import { Fragment } from 'react'; import { Link } from 'react-router-dom'; import classes from './ActionButton.module.css'; import Icon from '../../Icon/Icon'; interface ComponentProps { name: string; icon: string; link?: string; handler?: () => void; } const ActionButton = (props: ComponentProps): JSX.Element => { const body = (
{props.name}
); if (props.link) { return ({body}) } else if (props.handler) { return (
{body}
) } else { return (
{body}
) } } export default ActionButton;