({
width,
widthOffset = 0,
char = '─',
color,
})
| 21 | } |
| 22 | |
| 23 | export const Separator: React.FC<SeparatorProps> = ({ |
| 24 | width, |
| 25 | widthOffset = 0, |
| 26 | char = '─', |
| 27 | color, |
| 28 | }) => { |
| 29 | const theme = useTheme() |
| 30 | const separatorWidth = Math.max(1, width - widthOffset) |
| 31 | const fgColor = color || theme.border |
| 32 | |
| 33 | return ( |
| 34 | <box style={{ height: 1, flexShrink: 0 }}> |
| 35 | <text style={{ wrapMode: 'none' }}> |
| 36 | <span fg={fgColor}>{char.repeat(separatorWidth)}</span> |
| 37 | </text> |
| 38 | </box> |
| 39 | ) |
| 40 | } |
nothing calls this directly
no test coverage detected