UNPKG

@mui/x-data-grid

Version:

The Community plan edition of the Data Grid components (MUI X).

16 lines 847 B
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; const _excluded = ["sortingOrder"]; import * as React from 'react'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; import { jsx as _jsx } from "react/jsx-runtime"; export const GridColumnUnsortedIcon = /*#__PURE__*/React.memo(function GridColumnHeaderSortIcon(props) { const { sortingOrder } = props, other = _objectWithoutPropertiesLoose(props, _excluded); const rootProps = useGridRootProps(); const [nextSortDirection] = sortingOrder; const Icon = nextSortDirection === 'asc' ? rootProps.slots.columnSortedAscendingIcon : rootProps.slots.columnSortedDescendingIcon; return Icon ? /*#__PURE__*/_jsx(Icon, _extends({}, other)) : null; });