sate-lib
Version:
A lightweight and modular React component library designed for modern web interfaces. **SATE Lib** powers the [sate.menu](https://sate.menu) platform with reusable, scalable, and themeable UI components.
2 lines • 1.11 kB
JavaScript
"use client";
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{RemoveScroll as i}from"react-remove-scroll";import{ButtonIcon as l}from"../button-icon/button-icon.js";import{Typography as t}from"../typography/typography.js";import s from"./drawer.styles.module.js";import{useDrawer as d}from"./useDrawer.js";let m=({open:m,onOpen:n,title:c,className:p,children:h})=>{let{state:f,onClose:v,present:y}=d({onOpenChange:n,open:m}),u=[s.root,s.rootGallery,p].filter(Boolean).join(" ");return r(o,{mode:y?"visible":"hidden",children:e(a,{children:[r("div",{"aria-hidden":!0,className:s.overlay,"data-state":f,onClick:v}),r(i,{forwardProps:!0,children:e("div",{"aria-label":c,"aria-modal":"true",className:u,"data-state":f,role:"dialog",children:[e("div",{className:s.header,children:[r("div",{className:s.close,children:r(l,{icon:"X2",onClick:v,size:"small",variant:"toned"})}),r(t,{as:"h2",className:s.title,variant:"bodyLargeEmphasis",children:c})]}),r("div",{className:s.panel,children:h})]})})]})})};export{m as DrawerGallery};