import * as React from 'react' ; import MaterialFab from '@material-ui/core/Fab' ; import { FabColor , IFabProps , MaterialFabColor } from './Fab.props' ; import colors from './__fixtures__/colors' ; import { useStyles } from './Fab.styles' ; import { getColorProp } from './getColorProp' ; export const defaultProps = { color : colors . primary , disabled : false } ; export const Fab = React . forwardRef < HTMLButtonElement , IFabProps > ( ( props , ref ) => { const { color , disabled , ... otherProps } = props ; const classes = useStyles ( ) ; return ( < MaterialFab classes = { classes } color = { getColorProp ( { color : color as FabColor } ) as MaterialFabColor } disabled = { disabled } ref = { ref } { ... otherProps } />); } ) ; Fab . displayName = 'Fab' ; Fab . defaultProps = defaultProps ; export default Fab ;