Skip to content

Commit a24af45

Browse files
committed
fix: [DX-2051] Fix OptimusTab title overflow
1 parent e4ab119 commit a24af45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

optimus/lib/src/tabs.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class OptimusTab extends StatelessWidget {
3636

3737
return Container(
3838
padding: EdgeInsets.symmetric(horizontal: tokens.spacing150),
39-
height: 48,
39+
height: tokens.sizing600,
4040
constraints: BoxConstraints(maxWidth: maxWidth ?? double.infinity),
4141
child: Row(
4242
mainAxisSize: MainAxisSize.min,
@@ -46,7 +46,7 @@ class OptimusTab extends StatelessWidget {
4646
padding: EdgeInsets.only(right: tokens.spacing50),
4747
child: Icon(icon, size: tokens.sizing200),
4848
),
49-
Text(label, overflow: TextOverflow.ellipsis),
49+
Flexible(child: Text(label, overflow: TextOverflow.ellipsis)),
5050
if (badge case final badge?)
5151
Padding(
5252
padding: EdgeInsets.only(left: tokens.spacing50),

storybook/lib/stories/tab/tabs.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final Story tabsStory = Story(
2222
tabs: _items
2323
.map(
2424
(i) => OptimusTab(
25-
label: 'Tab ${i + 1}',
25+
label: i.isEven ? 'Tab with long name' : 'Tab ${i + 1}',
2626
icon: i.isOdd ? icon : null,
2727
badge: i.isOdd ? badge : null,
2828
maxWidth: _tabBarWidth / _items.length,

0 commit comments

Comments
 (0)