1
0
Fork 0
react-playground/node_modules/@mui/x-date-pickers/esm/internals/hooks/useToolbarOwnerState.js
Techognito fc0f69dacb Added Statistics calculation
Statistics now show calculated values
2025-09-04 17:30:00 +02:00

13 lines
No EOL
497 B
JavaScript

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]);
}