| 1 | export interface DividerProps { |
| 2 | label?: string; |
| 3 | className?: string; |
| 4 | } |
| 5 | |
| 6 | export function Divider({ label, className = "" }: DividerProps) { |
| 7 | if (!label) { |
| 8 | return ( |
| 9 | <hr |
| 10 | className={className} |
| 11 | style={{ border: "none", borderTop: "1px solid var(--border)" }} |
| 12 | /> |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | return ( |
| 17 | <div |
| 18 | className={`flex items-center gap-3 ${className}`} |
| 19 | style={{ color: "var(--text-faint)" }} |
| 20 | > |
| 21 | <div |
| 22 | className="flex-1 h-px" |
| 23 | style={{ backgroundColor: "var(--border-subtle)" }} |
| 24 | /> |
| 25 | <span className="text-xs">{label}</span> |
| 26 | <div |
| 27 | className="flex-1 h-px" |
| 28 | style={{ backgroundColor: "var(--border-subtle)" }} |
| 29 | /> |
| 30 | </div> |
| 31 | ); |
| 32 | } |
| 33 | |