import * as React from 'react'; import Ad from '_shared/Ad'; import Code from '_shared/Code'; import PropTypesTable from '_shared/PropTypesTable'; import KawaiiIcon from '_shared/svgIcons/KawaiiIcon'; import { PageMeta } from '_shared/PageMeta'; import { WithRouterProps, withRouter } from 'next/router'; import { Typography, Grid, makeStyles } from '@material-ui/core'; const internalComponents = ['Calendar', 'ClockView', 'Day']; const useStyles = makeStyles((theme) => ({ kawaiiIcon: { marginTop: 48, }, title: { [theme.breakpoints.down('xs')]: { order: 2, }, }, })); const Docs: React.FC = ({ router }) => { const classes = useStyles(); const componentName = router!.query!.component! as any; // just crash if name is invalid const title = `${componentName} API`; const description = `Here you can find the full list and description for ${componentName} props.`; return (

{title}

{description}

Import

{`import { ${componentName} } from '@material-ui/pickers'`} DateIOType — date object type of your linked date-io adapter (Moment, DayJS, etc.) {!internalComponents.includes(componentName) && (

Mobile Wrapper

Props available on mobile device with {componentName} or with `Mobile{componentName}`

Desktop Wrapper

Props available on desktop device with `{componentName}` or with `Mobile{componentName}`
)}
); }; export default withRouter(Docs);