@wener/console
Version:
Base console UI toolkit
37 lines (36 loc) • 1.48 kB
JavaScript
import React, { forwardRef } from "react";
import * as Dialog from "@radix-ui/react-dialog";
import { cn } from "@wener/console";
(function(DaisyDrawer) {
DaisyDrawer.Trigger = Dialog.Trigger;
DaisyDrawer.Root = Dialog.Root;
DaisyDrawer.Portal = Dialog.Portal;
DaisyDrawer.Overlay = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>{
return /*#__PURE__*/ React.createElement(Dialog.Overlay, {
className: 'fixed inset-0 z-30 bg-base-300 opacity-75',
ref: ref,
...props
}, children);
});
DaisyDrawer.Content = ({ className, children, ...props })=>{
return /*#__PURE__*/ React.createElement(Dialog.Content, {
className: cn('fixed right-0 z-30 h-full w-56 border-l bg-base-100', className),
...props
}, children);
};
DaisyDrawer.Title = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>{
return /*#__PURE__*/ React.createElement(Dialog.Title, {
className: cn(className, 'p-2 text-lg font-medium'),
...props,
ref: ref
}, children);
});
DaisyDrawer.Description = /*#__PURE__*/ forwardRef(({ children, ...props }, ref)=>{
return /*#__PURE__*/ React.createElement(Dialog.Description, {
...props,
ref: ref
}, children);
});
})(DaisyDrawer || (DaisyDrawer = {}));
export var DaisyDrawer;
//# sourceMappingURL=DaisyDrawer.js.map