Skip to content

Commit 4a535bc

Browse files
fix: Simplify components
1 parent ad6ea75 commit 4a535bc

File tree

5 files changed

+17
-27
lines changed

5 files changed

+17
-27
lines changed

src/components/ColumnsConfiguration/ColumnConfigurationItem.react.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export default ({ name, handleColumnDragDrop, index, onChangeVisible, visible })
3232
}}
3333
onClick={() => onChangeVisible(!visible)}>
3434
<div className={[styles.icon, styles.visibilityIcon].join(' ')}>
35-
<Icon name={visible ? 'visibility' : 'visibility_off'} width={20} height={20} fill={visible ? 'white' : 'rgba(0,0,0,0.4)'} />
35+
<Icon name={visible ? 'visibility' : 'visibility_off'} width={18} height={18} fill={visible ? 'white' : 'rgba(0,0,0,0.4)'} />
3636
</div>
37-
<div className={styles.columnConfigItemName} title={name.length > 14 ? name : undefined}>{name}</div>
37+
<div className={styles.columnConfigItemName} title={name}>{name}</div>
3838
<div className={styles.icon}>
39-
<Icon name='drag-indicator' width={16} height={16} fill="white" />
39+
<Icon name='drag-indicator' width={14} height={14} fill="white" />
4040
</div>
4141
</section>
4242
));

src/components/ColumnsConfiguration/ColumnsConfiguration.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ export default class ColumnsConfiguration extends React.Component {
100100
);
101101
}
102102
return (
103-
<div className={styles.wrap}>
103+
<>
104104
{entry}
105105
{popover}
106-
</div>
106+
</>
107107
);
108108
}
109109
}

src/components/ColumnsConfiguration/ColumnsConfiguration.scss

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
@import 'stylesheets/globals.scss';
22

3-
.wrap {
4-
display: inline-block;
5-
}
6-
73
.entry {
8-
height: 30px;
9-
padding: 8px;
4+
display: inline-block;
5+
height: 14px;
6+
padding: 0 8px;
107

118
svg {
129
fill: #66637A;
@@ -18,8 +15,9 @@
1815
}
1916

2017
.title {
18+
margin-top: -4px;
2119
background: #797691;
22-
padding: 8px;
20+
padding: 4px 8px;
2321
border-radius: 5px 5px 0 0;
2422

2523
svg {
@@ -29,29 +27,25 @@
2927

3028
.entry, .title {
3129
@include NotoSansFont;
32-
position: relative;
33-
bottom: -4px;
3430
font-size: 14px;
3531
color: #ffffff;
3632
cursor: pointer;
3733

3834
svg {
39-
vertical-align: top;
40-
margin-right: 6px;
35+
vertical-align: middle;
36+
margin-right: 4px;
4137
}
4238

4339
span {
44-
display: inline-block;
45-
vertical-align: top;
46-
height: 14px;
40+
vertical-align: middle;
4741
line-height: 14px;
4842
}
4943
}
5044

5145
.body {
5246
color: white;
5347
position: absolute;
54-
top: 30px;
48+
top: 22px;
5549
right: 0;
5650
border-radius: 5px 0 5px 5px;
5751
background: #797691;

src/components/Popover/Popover.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default class Popover extends React.Component {
9090
}
9191

9292
render() {
93-
return <div></div>;
93+
return null;
9494
}
9595
}
9696

src/icons/manage-columns.svg

Lines changed: 2 additions & 6 deletions
Loading

0 commit comments

Comments
 (0)