UNPKG

@mui/x-date-pickers

Version:

The community edition of the Date and Time Picker components (MUI X).

13 lines 497 B
import _extends from "@babel/runtime/helpers/esm/extends"; import * as React from 'react'; import { useRtl } from '@mui/system/RtlProvider'; import { usePickerPrivateContext } from "./usePickerPrivateContext.js"; export function useToolbarOwnerState() { const { ownerState: pickerOwnerState } = usePickerPrivateContext(); const isRtl = useRtl(); return React.useMemo(() => _extends({}, pickerOwnerState, { toolbarDirection: isRtl ? 'rtl' : 'ltr' }), [pickerOwnerState, isRtl]); }