UNPKG

@postenbring/hedwig-react

Version:

React components for [Hedwig Design System](https://github.com/bring/hedwig-design-system).

36 lines (34 loc) 936 B
import { __objRest, __spreadProps, __spreadValues } from "./chunk-YOSPWY5K.mjs"; // src/styled-html/styled-html.tsx import { forwardRef } from "react"; import { clsx } from "@postenbring/hedwig-css/typed-classname"; import { Slot } from "@radix-ui/react-slot"; import { jsx } from "react/jsx-runtime"; var StyledHtml = forwardRef( (_a, ref) => { var _b = _a, { asChild, children, size, className } = _b, rest = __objRest(_b, ["asChild", "children", "size", "className"]); const Component = asChild ? Slot : "div"; return /* @__PURE__ */ jsx( Component, __spreadProps(__spreadValues({ className: clsx( `hds-styled-html`, size === "small" && "hds-styled-html--small", className ), ref }, rest), { children }) ); } ); StyledHtml.displayName = "StyledHtml"; export { StyledHtml }; //# sourceMappingURL=chunk-I76U35YW.mjs.map