Skip to content

Commit 2302736

Browse files
fix: review
1 parent 4a11936 commit 2302736

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

src/components/VersionsBar/VersionsBar.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
}
7171
}
7272

73+
&__button {
74+
width: max-content;
75+
}
76+
7377
&__title-text,
7478
&__version,
7579
&__version-icon {

src/components/VersionsBar/VersionsBar.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,25 @@ export function VersionsBar({preparedVersions, withTitles = true, size = 's'}: V
7676

7777
if (allVersionsDisplayed) {
7878
return (
79-
<Button view="flat-secondary" size={'s'} onClick={handleHideAllVersions}>
79+
<Button
80+
view="flat-secondary"
81+
size={'s'}
82+
onClick={handleHideAllVersions}
83+
className={b('button')}
84+
>
8085
{i18n('action_hide', {
8186
count: truncatedVersionsCount,
8287
})}
8388
</Button>
8489
);
8590
} else {
8691
return (
87-
<Button view="flat-secondary" size={'s'} onClick={handleShowAllVersions}>
92+
<Button
93+
view="flat-secondary"
94+
size={'s'}
95+
onClick={handleShowAllVersions}
96+
className={b('button')}
97+
>
8898
{i18n('action_show_more', {
8999
count: truncatedVersionsCount,
90100
})}
@@ -154,7 +164,7 @@ export function VersionsBar({preparedVersions, withTitles = true, size = 's'}: V
154164
size={size}
155165
/>
156166
))}
157-
<Flex>{renderButton()}</Flex>
167+
{renderButton()}
158168
</Flex>
159169
)}
160170
</Flex>
@@ -166,8 +176,8 @@ interface VersionTitleProps {
166176
color: string;
167177
count?: number;
168178
isDimmed: boolean;
169-
onMouseEnter: () => void;
170-
onMouseLeave: () => void;
179+
onMouseEnter: VoidFunction;
180+
onMouseLeave: VoidFunction;
171181
size: VersionsBarSize;
172182
}
173183

0 commit comments

Comments
 (0)