Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

fieldset.tsx

26 lines659 Bytes

1"use client";
2​
3import { Fieldset as FieldsetPrimitive } from "@base-ui/react/fieldset";
4​
5import { cn } from "~/lib/utils";
6​
7function Fieldset({ className, ...props }: FieldsetPrimitive.Root.Props) {
8 return (
9 <FieldsetPrimitive.Root
10 className={cn("flex w-full max-w-64 flex-col gap-6", className)}
11 data-slot="fieldset"
12 {...props}
13 />
14 );
16function FieldsetLegend({ className, ...props }: FieldsetPrimitive.Legend.Props) {
17 return (
18 <FieldsetPrimitive.Legend
19 className={cn("font-semibold text-foreground", className)}
20 data-slot="fieldset-legend"
21 {...props}
22 />
23 );
25​
26export { Fieldset, FieldsetLegend };