Skip to content

Commit 5ceb9ba

Browse files
fix(i18n): fix lineage button with fixed width
1 parent 4ce03a2 commit 5ceb9ba

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

datahub-web-react/src/app/entityV2/shared/tabs/Lineage/LineageTab.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TabFullsizedContext from '@app/shared/TabFullsizedContext';
1414

1515
import { LineageDirection } from '@types';
1616

17-
const LINEAGE_SWITCH_WIDTH = 90;
17+
const LINEAGE_SWITCH_MIN_WIDTH = 90;
1818

1919
const LineageTabWrapper = styled.div`
2020
display: flex;
@@ -27,7 +27,7 @@ const LineageSwitchWrapper = styled.div`
2727
border-radius: 4.5px;
2828
display: flex;
2929
margin: 13px 11px;
30-
width: ${LINEAGE_SWITCH_WIDTH * 2}px;
30+
width: fit-content;
3131
`;
3232

3333
const LineageViewSwitch = styled.div<{ selected: boolean }>`
@@ -36,11 +36,14 @@ const LineageViewSwitch = styled.div<{ selected: boolean }>`
3636
color: ${({ selected, theme }) => (selected ? theme.colors.bg : theme.colors.textBrand)};
3737
cursor: pointer;
3838
display: flex;
39+
flex: 1;
3940
font-size: 10px;
4041
justify-content: center;
4142
line-height: 24px;
4243
height: 24px;
43-
width: ${LINEAGE_SWITCH_WIDTH}px;
44+
min-width: ${LINEAGE_SWITCH_MIN_WIDTH}px;
45+
padding: 0 12px;
46+
white-space: nowrap;
4447
`;
4548

4649
const VisualizationWrapper = styled.div`

0 commit comments

Comments
 (0)