Skip to content

Commit e07dea8

Browse files
committed
fix(FileTabs): limit the max width * 5
1 parent 8f77516 commit e07dea8

File tree

1 file changed

+7
-48
lines changed

1 file changed

+7
-48
lines changed

src/components/organisms/FileTabs/FileTabs.tsx

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
useRef,
77
useState,
88
} from 'react';
9-
import styled from 'styled-components';
109

1110
import { Block } from '../../Block';
1211
import { Action, Button, CubeActionProps } from '../../actions';
@@ -55,54 +54,14 @@ const TabsContainerElement = tasty(Flex, {
5554
height: 'max 100%',
5655
width: 'max 100%',
5756
position: 'relative',
57+
fade: {
58+
'': false,
59+
'[data-is-left-fade]': '3x left',
60+
'[data-is-right-fade]': '3x right',
61+
},
5862
},
5963
});
6064

61-
const StyledTabsContainerElement = styled(TabsContainerElement)`
62-
&::before {
63-
content: '';
64-
display: block;
65-
opacity: 0;
66-
position: absolute;
67-
top: 0;
68-
left: 0;
69-
pointer-events: none;
70-
width: 32px;
71-
height: 37px;
72-
transition: all 0.15s linear;
73-
background-image: linear-gradient(
74-
to left,
75-
rgba(255, 255, 255, 0),
76-
rgba(255, 255, 255, 1)
77-
);
78-
z-index: 1;
79-
}
80-
81-
&::after {
82-
content: '';
83-
display: block;
84-
opacity: 0;
85-
position: absolute;
86-
top: 0;
87-
right: 0;
88-
width: 32px;
89-
height: 37px;
90-
pointer-events: none;
91-
transition: all 0.15s linear;
92-
background-image: linear-gradient(
93-
to right,
94-
rgba(255, 255, 255, 0),
95-
rgba(255, 255, 255, 1)
96-
);
97-
z-index: 1;
98-
}
99-
100-
&[data-is-left-fade]::before,
101-
&[data-is-right-fade]::after {
102-
opacity: 1;
103-
}
104-
`;
105-
10665
const DirtyBadge = tasty({
10766
element: 'DirtyBadge',
10867
styles: {
@@ -385,7 +344,7 @@ export function FileTabs({
385344
}
386345

387346
return (
388-
<StyledTabsContainerElement
347+
<TabsContainerElement
389348
data-is-left-fade={leftFade || null}
390349
data-is-right-fade={rightFade || null}
391350
{...props}
@@ -423,7 +382,7 @@ export function FileTabs({
423382
{children}
424383
</Flex>
425384
</FileTabsContext.Provider>
426-
</StyledTabsContainerElement>
385+
</TabsContainerElement>
427386
);
428387
}
429388

0 commit comments

Comments
 (0)