UNPKG

welcome-ui

Version:

Customizable design system with react • styled-components • styled-system and ariakit.

29 lines (27 loc) 784 B
"use client"; import { j as t } from "./jsx-runtime-Bqq1Hxg9.mjs"; import { Label as l } from "./Label.mjs"; import { shouldForwardProp as m, forwardRef as n } from "./System.mjs"; import p, { th as a } from "@xstyled/styled-components"; const o = p.fieldsetBox.withConfig({ shouldForwardProp: m })` width: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; ${a("defaultFields.fieldset")}; > * { margin-bottom: md; } `, f = n( ({ children: d, dataTestId: e, label: i, required: r }, s) => /* @__PURE__ */ t.jsxs(o, { "data-testid": e, ref: s, children: [ i ? /* @__PURE__ */ t.jsx(l, { as: "legend", required: r, children: i }) : null, d ] }) ); f.displayName = "FieldGroup"; const x = o; export { f as FieldGroup, x as StyledFieldGroup };