| 145 | } |
| 146 | |
| 147 | function FieldSeparator({ |
| 148 | children, |
| 149 | className, |
| 150 | ...props |
| 151 | }: React.ComponentProps<"div"> & { |
| 152 | children?: React.ReactNode; |
| 153 | }) { |
| 154 | return ( |
| 155 | <div |
| 156 | data-slot="field-separator" |
| 157 | data-content={!!children} |
| 158 | className={cn( |
| 159 | "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", |
| 160 | className, |
| 161 | )} |
| 162 | {...props} |
| 163 | > |
| 164 | <Separator className="absolute inset-0 top-1/2" /> |
| 165 | {children && ( |
| 166 | <span |
| 167 | className="relative mx-auto block w-fit bg-background px-2 text-muted-foreground" |
| 168 | data-slot="field-separator-content" |
| 169 | > |
| 170 | {children} |
| 171 | </span> |
| 172 | )} |
| 173 | </div> |
| 174 | ); |
| 175 | } |
| 176 | |
| 177 | function FieldError({ |
| 178 | className, |