UNPKG

@it-corp/vpbank-spotlight

Version:

Command center components for react and VPbank components

59 lines (53 loc) 1.76 kB
'use client'; 'use strict'; var React = require('react'); var vpbankCore = require('@it-corp/vpbank-core'); var Spotlight_context = require('./Spotlight.context.cjs'); var spotlight_store = require('./spotlight.store.cjs'); var Spotlight_module = require('./Spotlight.module.css.cjs'); function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } var React__default = /*#__PURE__*/_interopDefault(React); const defaultProps = {}; const SpotlightActionsList = vpbankCore.factory( (props, ref) => { const { className, style, id, children, vars, classNames, styles, ...others } = vpbankCore.useProps("SpotlightActionsList", defaultProps, props); const ctx = Spotlight_context.useSpotlightContext(); const generatedId = `mantine-${React.useId().replace(/:/g, "")}`; const listId = id || generatedId; React.useEffect(() => { spotlight_store.spotlightActions.setListId(listId, ctx.store); return () => spotlight_store.spotlightActions.setListId("", ctx.store); }, []); return /* @__PURE__ */ React__default.default.createElement( vpbankCore.ScrollArea.Autosize, { ...ctx.getStyles("actionsList", { className, style, classNames, styles }), ref, type: "scroll", scrollbarSize: "var(--spotlight-actions-list-padding)", offsetScrollbars: "y", id: listId, ...others }, children ); } ); SpotlightActionsList.classes = Spotlight_module; SpotlightActionsList.displayName = "@it-corp/vpbank-spotlight/SpotlightActionsList"; exports.SpotlightActionsList = SpotlightActionsList; //# sourceMappingURL=SpotlightActionsList.cjs.map