import React, { ReactNode, BaseSyntheticEvent } from 'react'; interface FabButtonProps { onClick?: (event: BaseSyntheticEvent) => void, icon?: ReactNode, className?: string, disabled?: boolean, type?: 'submit' | 'reset' | 'button', form?: string, tooltip?: string, } /** * This component is a template for a clickable button that wraps the application style */ export const FabButton: React.FC = ({ onClick, icon, className, disabled, type, form, tooltip, children }) => { /** * Check if the current component was provided an icon to display */ const hasIcon = (): boolean => { return !!icon; }; /** * Check if the current button has children properties (like some text) */ const hasChildren = (): boolean => { return !!children; }; /** * Handle the action of the button */ const handleClick = (e: BaseSyntheticEvent): void => { if (typeof onClick === 'function') { onClick(e); } }; return ( ); }; FabButton.defaultProps = { type: 'button' };