UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

22 lines (21 loc) 842 B
"use strict"; 'use client'; Object.defineProperty(exports, "__esModule", { value: true }); exports.useItemHighlightState = useItemHighlightState; var _useStore = require("../internals/store/useStore"); var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight"); /** * A hook to check the highlighted state of the item. * This function already calculates that an item is not faded if it is highlighted. * * If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead. * * @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check * @returns {HighlightState} the state of the item */ function useItemHighlightState(item) { const store = (0, _useStore.useStore)(); return store.use(_useChartHighlight.selectorChartsHighlightState, item); }