Skip to content

Commit 299910e

Browse files
review: use button to wrap group title
1 parent d27f6c0 commit 299910e

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

src/containers/Storage/TableGroup/TableGroup.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
44

55
width: 100%;
66
margin-bottom: 20px;
7-
padding: 8px 0;
87

98
border: 1px solid var(--g-color-line-generic);
109
border-radius: var(--g-spacing-2);
1110

11+
&__button {
12+
padding: 8px 0;
13+
14+
cursor: pointer;
15+
16+
border: unset;
17+
background: unset;
18+
}
19+
1220
&__title-wrapper {
1321
position: sticky;
1422
left: 0;
@@ -21,8 +29,6 @@
2129

2230
width: max-content;
2331
padding-left: 20px;
24-
25-
cursor: pointer;
2632
}
2733

2834
&__title {
@@ -38,6 +44,6 @@
3844
}
3945

4046
&__content {
41-
padding: 20px 0 20px 20px;
47+
padding: 12px 0 20px 20px;
4248
}
4349
}

src/containers/Storage/TableGroup/TableGroup.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ export function TableGroup({
3232

3333
const renderTitle = () => {
3434
return (
35-
<div onClick={toggleCollapsed} className={b('title-wrapper')} tabIndex={0}>
36-
<ArrowToggle direction={expanded ? 'top' : 'bottom'} />
37-
<div className={b('title')}>
38-
<Text variant="subheader-2">{title}</Text>
39-
<Text variant="body-2" color="secondary" className={b('count')}>
40-
{entityName}: <Label theme="normal">{count}</Label>
41-
</Text>
35+
<button onClick={toggleCollapsed} className={b('button')}>
36+
<div className={b('title-wrapper')}>
37+
<ArrowToggle direction={expanded ? 'top' : 'bottom'} />
38+
<div className={b('title')}>
39+
<Text variant="subheader-2">{title}</Text>
40+
<Text variant="body-2" color="secondary" className={b('count')}>
41+
{entityName}: <Label theme="normal">{count}</Label>
42+
</Text>
43+
</div>
4244
</div>
43-
</div>
45+
</button>
4446
);
4547
};
4648

0 commit comments

Comments
 (0)