UNPKG

@empoleon/spotlight

Version:

Command center components for react and Empoleon

38 lines (35 loc) 1.27 kB
import { createComponent, mergeProps } from 'solid-js/web'; import { splitProps } from 'solid-js'; import { factory, useProps, Box } from '@empoleon/core'; import { useSpotlightContext } from './Spotlight.context.mjs'; import classes from './Spotlight.module.css.mjs'; const defaultProps = {}; const SpotlightActionsGroup = factory(_props => { const props = useProps("SpotlightActionsGroup", defaultProps, _props); const [local, others] = splitProps(props, ["className", "style", "styles", "classNames", "label", "children", "ref"]); const ctx = useSpotlightContext(); return createComponent(Box, mergeProps(() => ctx.getStyles("actionsGroup", { className: local.className, style: local.style, classNames: local.classNames, styles: local.styles }), { ref(r$) { var _ref$ = local.ref; typeof _ref$ === "function" ? _ref$(r$) : local.ref = r$; } }, others, { get __vars() { return { "--spotlight-label": `'${local.label}'` }; }, get children() { return local.children; } })); }); SpotlightActionsGroup.classes = classes; SpotlightActionsGroup.displayName = "@empoleon/core/SpotlightActionsGroup"; export { SpotlightActionsGroup }; //# sourceMappingURL=SpotlightActionsGroup.mjs.map