From b252ca8613e75f338ece1487bb911d92d46a425c Mon Sep 17 00:00:00 2001 From: flavien Date: Tue, 29 Oct 2024 15:22:31 +0100 Subject: [PATCH] Fix --- .../custom-field/PickerWithButtonField.js | 59 -------------- .../custom-field/PickerWithButtonField.tsx | 80 ------------------- .../PickerWithButtonField.tsx.preview | 5 -- 3 files changed, 144 deletions(-) delete mode 100644 docs/data/date-pickers/custom-field/PickerWithButtonField.js delete mode 100644 docs/data/date-pickers/custom-field/PickerWithButtonField.tsx delete mode 100644 docs/data/date-pickers/custom-field/PickerWithButtonField.tsx.preview diff --git a/docs/data/date-pickers/custom-field/PickerWithButtonField.js b/docs/data/date-pickers/custom-field/PickerWithButtonField.js deleted file mode 100644 index ba5162eb73e5..000000000000 --- a/docs/data/date-pickers/custom-field/PickerWithButtonField.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react'; - -import Button from '@mui/material/Button'; -import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DatePicker } from '@mui/x-date-pickers/DatePicker'; - -function ButtonField(props) { - const { - setOpen, - label, - id, - disabled, - InputProps: { ref } = {}, - inputProps: { 'aria-label': ariaLabel } = {}, - } = props; - - return ( - - ); -} - -function ButtonDatePicker(props) { - const [open, setOpen] = React.useState(false); - - return ( - setOpen(false)} - onOpen={() => setOpen(true)} - /> - ); -} - -export default function PickerWithButtonField() { - const [value, setValue] = React.useState(null); - - return ( - - - - ); -} diff --git a/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx b/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx deleted file mode 100644 index 9efd6f7c7e24..000000000000 --- a/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import * as React from 'react'; -import { Dayjs } from 'dayjs'; -import Button from '@mui/material/Button'; -import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DatePicker, DatePickerProps } from '@mui/x-date-pickers/DatePicker'; -import { UseDateFieldProps } from '@mui/x-date-pickers/DateField'; -import { - BaseSingleInputFieldProps, - DateValidationError, - FieldSection, - PickerValidDate, - SimpleValue, -} from '@mui/x-date-pickers/models'; - -interface ButtonFieldProps - extends UseDateFieldProps, - BaseSingleInputFieldProps< - PickerValidDate | null, - FieldSection, - true, - DateValidationError - > { - setOpen?: React.Dispatch>; -} - -function ButtonField(props: ButtonFieldProps) { - const { - setOpen, - label, - id, - disabled, - InputProps: { ref } = {}, - inputProps: { 'aria-label': ariaLabel } = {}, - } = props; - - return ( - - ); -} - -function ButtonDatePicker( - props: Omit, -) { - const [open, setOpen] = React.useState(false); - - return ( - setOpen(false)} - onOpen={() => setOpen(true)} - /> - ); -} - -export default function PickerWithButtonField() { - const [value, setValue] = React.useState(null); - - return ( - - - - ); -} diff --git a/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx.preview b/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx.preview deleted file mode 100644 index 3d52e8e412a6..000000000000 --- a/docs/data/date-pickers/custom-field/PickerWithButtonField.tsx.preview +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file