diff --git a/packages/material-ui-lab/src/internal/pickers/PickersToolbarButton.tsx b/packages/material-ui-lab/src/internal/pickers/PickersToolbarButton.tsx index f882b2838785ba..fd2425be408ced 100644 --- a/packages/material-ui-lab/src/internal/pickers/PickersToolbarButton.tsx +++ b/packages/material-ui-lab/src/internal/pickers/PickersToolbarButton.tsx @@ -1,12 +1,11 @@ import * as React from 'react'; -import clsx from 'clsx'; import Button, { ButtonProps } from '@material-ui/core/Button'; -import { MuiStyles, WithStyles, withStyles } from '@material-ui/core/styles'; +import { experimentalStyled as styled } from '@material-ui/core/styles'; import { TypographyProps } from '@material-ui/core/Typography'; import PickersToolbarText from './PickersToolbarText'; import { ExtendMui } from './typings/helpers'; -export interface ToolbarButtonProps extends ExtendMui { +export interface PickersToolbarButtonProps extends ExtendMui { align?: TypographyProps['align']; selected: boolean; typographyClassName?: string; @@ -14,46 +13,38 @@ export interface ToolbarButtonProps extends ExtendMui = { - root: { - padding: 0, - minWidth: '16px', - textTransform: 'none', - }, -}; - -const ToolbarButton: React.FunctionComponent> = ( - props, -) => { - const { - align, - classes, - className, - selected, - typographyClassName, - value, - variant, - ...other - } = props; +const PickersToolbarButton: React.FunctionComponent = React.forwardRef( + function PickersToolbarButton(props, ref) { + const { align, className, selected, typographyClassName, value, variant, ...other } = props; - return ( - - ); -}; + return ( + + + + ); + }, +); -export default withStyles(styles, { name: 'PrivatePickersToolbarButton' })(ToolbarButton); +export default PickersToolbarButton;