Skip to content

Commit 18ff9f3

Browse files
committed
fix: material-ui tab indicator width
1 parent 0112f9e commit 18ff9f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/extension/options-page/DashboardComponents/AbstractTab.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ export interface AbstractTabProps {
2828
export default function AbstractTab({ tabs, state, height = 200 }: AbstractTabProps) {
2929
const classes = useStyles()
3030
const [value, setValue] = state
31+
const tabIndicatorStyle = tabs.length > 0 ? { width: 100 / tabs.length + '%' } : {}
3132

3233
return (
3334
<>
3435
<Paper square elevation={0}>
3536
<Tabs
3637
value={value}
38+
TabIndicatorProps={{ style: tabIndicatorStyle }}
3739
variant="fullWidth"
3840
indicatorColor="primary"
3941
textColor="primary"

0 commit comments

Comments
 (0)