Skip to content

Commit 8523ff2

Browse files
committed
fix: select appearance
1 parent 0c6a3d2 commit 8523ff2

File tree

5 files changed

+74
-62
lines changed

5 files changed

+74
-62
lines changed

src/components/Dock.jsx

+3-27
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import { merge } from 'glamor';
44
import Dock from 'react-dock';
55
import ReactTooltip from 'react-tooltip';
66

7+
import Header from './Header';
78
import Draggable from './Draggable';
89
import SelectInitialForm from './SelectInitialForm';
910
import RenderFormData from './RenderFormData';
1011

11-
import Icons from '../icons';
1212
import $U from '../styles/_.utils';
1313
import style from '../styles/Dock';
1414

1515
export default observer(({ store, handlers }) => (
1616
<div className={style.dock}>
17+
<ReactTooltip />
1718
<Dock
1819
defaultSize={store.tools.open ? store.dock.size : 0}
1920
size={store.tools.open ? store.dock.size : 0}
@@ -24,36 +25,11 @@ export default observer(({ store, handlers }) => (
2425
dimMode={store.dock.mode}
2526
dockStyle={store.dock.style}
2627
>
27-
<ReactTooltip />
28-
2928
<div className={merge(style.draggable, store.tools.open && $U.hidden)}>
3029
<Draggable handlers={handlers} />
3130
</div>
3231

33-
<div className={merge(style.heading, !store.tools.open && $U.hidden)}>
34-
<div className={$U.left}>
35-
<b className={merge(style.hli, !store.tools.heading.name && $U.hidden)}>
36-
MOBX-REACT-FORM
37-
</b>
38-
<b className={merge(style.hlb, !store.tools.heading.sub && $U.hidden)}>
39-
DEVTOOLS
40-
</b>
41-
</div>
42-
<button
43-
className={merge($U.button, style.btn)}
44-
onClick={handlers.handleOnCloseTools}
45-
data-tip="CLOSE"
46-
>
47-
<Icons.FaChevronCircleRight className={style.icon} />
48-
</button>
49-
<button
50-
className={merge($U.button, style.btn)}
51-
onClick={handlers.handleOnOpenDoc}
52-
data-tip="DOCS"
53-
>
54-
<Icons.FaBook className={style.icon} />
55-
</button>
56-
</div>
32+
<Header store={store} handlers={handlers} />
5733

5834
{(store.selected.form && store.selected.key)
5935
? <RenderFormData store={store} handlers={handlers} />

src/components/Header.jsx

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react';
2+
import { observer } from 'mobx-react';
3+
import { merge } from 'glamor';
4+
5+
import Icons from '../icons';
6+
import $U from '../styles/_.utils';
7+
import style from '../styles/Header';
8+
9+
export default observer(({ store, handlers }) => (
10+
<div className={merge(style.heading, !store.tools.open && $U.hidden)}>
11+
<div className={$U.left}>
12+
<b className={merge(style.hli, !store.tools.heading.name && $U.hidden)}>
13+
MOBX-REACT-FORM
14+
</b>
15+
<b className={merge(style.hlb, !store.tools.heading.sub && $U.hidden)}>
16+
DEVTOOLS
17+
</b>
18+
</div>
19+
<button
20+
className={merge($U.button, style.btn)}
21+
onClick={handlers.handleOnCloseTools}
22+
data-tip="CLOSE"
23+
>
24+
<Icons.FaChevronCircleRight className={style.icon} />
25+
</button>
26+
<button
27+
className={merge($U.button, style.btn)}
28+
onClick={handlers.handleOnOpenDoc}
29+
data-tip="DOCS"
30+
>
31+
<Icons.FaBook className={style.icon} />
32+
</button>
33+
</div>
34+
));

src/styles/Dock.js

-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { style } from 'glamor';
2-
import theme from './_.theme';
32

43
export default {
54
dock: style({
@@ -8,38 +7,6 @@ export default {
87
display: 'none',
98
},
109
}),
11-
btn: style({
12-
float: 'right',
13-
margin: '-3px',
14-
}),
15-
icon: style({
16-
'fontSize': '22px',
17-
'color': theme.base0B,
18-
'paddingRight': '10px',
19-
':hover': {
20-
color: theme.base0A,
21-
},
22-
}),
23-
hli: style({
24-
color: theme.base0D,
25-
paddingLeft: '25px',
26-
}),
27-
hlb: style({
28-
color: theme.base09,
29-
paddingLeft: '10px',
30-
}),
31-
heading: style({
32-
fontSize: '14px',
33-
background: theme.base00,
34-
color: theme.base00,
35-
fontWeight: 'bold',
36-
textTransform: 'uppercase',
37-
padding: '14px 0 13px 0',
38-
margin: 0,
39-
position: 'absolute',
40-
width: '100%',
41-
zIndex: 99,
42-
}),
4310
draggable: style({
4411
position: 'fixed',
4512
right: '0px',

src/styles/Header.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { style } from 'glamor';
2+
import theme from './_.theme';
3+
4+
export default {
5+
btn: style({
6+
float: 'right',
7+
margin: '-3px',
8+
}),
9+
icon: style({
10+
'fontSize': '22px',
11+
'color': theme.base0B,
12+
'paddingRight': '10px',
13+
':hover': {
14+
color: theme.base0A,
15+
},
16+
}),
17+
hli: style({
18+
color: theme.base0D,
19+
paddingLeft: '25px',
20+
}),
21+
hlb: style({
22+
color: theme.base09,
23+
paddingLeft: '10px',
24+
}),
25+
heading: style({
26+
fontSize: '14px',
27+
background: theme.base00,
28+
color: theme.base00,
29+
fontWeight: 'bold',
30+
textTransform: 'uppercase',
31+
padding: '14px 0 13px 0',
32+
margin: 0,
33+
position: 'absolute',
34+
width: '100%',
35+
zIndex: 99,
36+
}),
37+
};

src/styles/SelectMenu.js

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export default {
1010
height: '28px',
1111
padding: '5px 35px 5px 10px',
1212
fontSize: '14px',
13-
webkitAppearance: 'none',
14-
mozAppearance: 'none',
1513
appearance: 'none',
1614
backgroundColor: theme.base00,
1715
backgroundPosition: 'right 50%',

0 commit comments

Comments
 (0)