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