UNPKG

@fefade/react

Version:

Reusable React UI components powered by the fefade core system.

57 lines (56 loc) 1.45 kB
import { jsxs as n, jsx as r } from "react/jsx-runtime"; import { forwardRef as i } from "react"; import { b as c } from "../../index-DdnSr7Dp.js"; import { r as b } from "../../index-D_2_TF79.js"; import m from "../button/Button.js"; import '../../assets/DrawerHeader.css';const _ = "_drawerHeader_o9abx_1", p = "_isClosable_o9abx_1", x = "_borded_o9abx_1", C = "_buttonClose_o9abx_1", e = { drawerHeader: _, isClosable: p, borded: x, buttonClose: C }, H = i((s, l) => { const { className: t = "", handleClose: o, children: a, ...d } = s; return /* @__PURE__ */ n( "div", { ...d, ref: l, className: c( t, [t, e], e.drawerHeader, { [e.isClosable]: !!o } ), children: [ a, o && /* @__PURE__ */ r( m, { variant: "text", className: e.buttonClose, onClick: o, children: /* @__PURE__ */ r( "svg", { viewBox: "0 -960 960 960", style: { display: "inline-block", verticalAlign: "middle", fill: "currentcolor", width: "24px", height: "24px" }, children: /* @__PURE__ */ r("path", { d: b }) } ) } ) ] } ); }); export { H as default };