({
label,
isLit,
children,
}: {
label: ReactNode;
isLit?: boolean;
children?: ReactNode;
})
| 150 | // The lit label is bold; an invisible bold copy holds every label at its |
| 151 | // bold width, so lighting a tab never moves the row. |
| 152 | const TabLabel = ({ |
| 153 | label, |
| 154 | isLit, |
| 155 | children, |
| 156 | }: { |
| 157 | label: ReactNode; |
| 158 | isLit?: boolean; |
| 159 | children?: ReactNode; |
| 160 | }): ReactElement => ( |
| 161 | <span data-tab-label className="relative flex items-center"> |
| 162 | {typeof label === 'string' ? ( |
| 163 | <span |
| 164 | data-text={label} |
| 165 | className={classNames( |
| 166 | 'inline-flex flex-col after:invisible after:h-0 after:select-none after:overflow-hidden after:font-bold after:content-[attr(data-text)]', |
| 167 | isLit ? 'font-bold' : 'font-medium', |
| 168 | )} |
| 169 | > |
| 170 | {label} |
| 171 | </span> |
| 172 | ) : ( |
| 173 | <span className={isLit ? 'font-bold' : 'font-medium'}>{label}</span> |
| 174 | )} |
| 175 | {children} |
| 176 | </span> |
| 177 | ); |
| 178 | |
| 179 | const RowChip = ({ |
| 180 | item, |
nothing calls this directly
no outgoing calls
no test coverage detected