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