UNPKG

@empoleon/spotlight

Version:

Command center components for react and Empoleon

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