UNPKG

@nex-ui/react

Version:

🎉 A beautiful, modern, and reliable React component library.

31 lines (28 loc) • 746 B
"use client"; import { jsx } from 'react/jsx-runtime'; import { defineRecipe } from '@nex-ui/system'; import { useSlot } from '../utils/useSlot.mjs'; const recipe = defineRecipe({ base: { position: 'fixed', inset: 0, bg: 'black/50' } }); const style = recipe(); const ModalBackdrop = (inProps)=>{ const props = inProps; const [ModalBackdropRoot, getModalBackdropRootProps] = useSlot({ style, elementType: 'div', externalForwardedProps: props, a11y: { 'aria-hidden': true } }); return /*#__PURE__*/ jsx(ModalBackdropRoot, { ...getModalBackdropRootProps() }); }; ModalBackdrop.displayName = 'ModalBackdrop'; export { ModalBackdrop };