Skip to content

Commit c43ae96

Browse files
committed
Add version 1.0.0
1 parent 0e0fc3c commit c43ae96

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

index.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
var themeStyles = {
2+
container: function(provided) {
3+
return Object.assign(provided, {
4+
boxShadow: '0 4px #212529,0 -4px #212529,4px 0 #212529,-4px 0 #212529',
5+
});
6+
},
7+
control: function(provided, state) {
8+
return Object.assign(provided, {
9+
boxShadow: 'none',
10+
border: 'none',
11+
'&:hover': {
12+
cursor: state.isFocused ? 'text' : 'pointer',
13+
},
14+
});
15+
},
16+
valueContainer: function(provided) {
17+
return Object.assign(provided, {
18+
padding: '.5rem 1rem',
19+
});
20+
},
21+
indicatorSeparator: function() {
22+
return ({
23+
display: 'none',
24+
});
25+
},
26+
dropdownIndicator: function() {
27+
return ({
28+
position: 'relative',
29+
width: '50px',
30+
height: '100%',
31+
'&::before': {
32+
position: 'absolute',
33+
top: 'calc(50% - 9.6px)',
34+
left: 'calc(50% + 9.6px)',
35+
width: '2px',
36+
height: '2px',
37+
content: '""',
38+
transform: 'scale(1.2) rotate(90deg)',
39+
boxShadow: '2px 2px 0 .020em, 4px 2px 0 .020em, 2px 4px 0 .020em, 4px 4px 0 .020em, 6px 4px 0 .020em, 8px 4px 0 .020em, 2px 6px 0 .020em, 4px 6px 0 .020em, 6px 6px 0 .020em, 8px 6px 0 .020em, 10px 6px 0 .020em, 2px 8px 0 .020em, 4px 8px 0 .020em, 6px 8px 0 .020em, 8px 8px 0 .020em, 10px 8px 0 .020em, 12px 8px 0 .020em, 2px 10px 0 .020em, 4px 10px 0 .020em, 6px 10px 0 .020em, 8px 10px 0 .020em, 10px 10px 0 .020em, 2px 12px 0 .020em, 4px 12px 0 .020em, 6px 12px 0 .020em, 8px 12px 0 .020em, 2px 14px 0 .020em, 4px 14px 0 .020em',
40+
},
41+
'& svg': {
42+
display: 'none',
43+
},
44+
});
45+
},
46+
placeholder: function(provided) {
47+
return Object.assign(provided, {
48+
marginLeft: '4px',
49+
});
50+
},
51+
menu: function(provided) {
52+
return Object.assign(provided, {
53+
marginTop: '4px',
54+
border: 'none',
55+
borderRadius: '0',
56+
boxShadow: '0 4px #212529,0 -4px #212529,4px 0 #212529,-4px 0 #212529',
57+
});
58+
},
59+
menuList: function(provided) {
60+
return Object.assign(provided, {
61+
padding: '0',
62+
});
63+
},
64+
option: function(provided, state) {
65+
return Object.assign(provided, {
66+
position: 'relative',
67+
paddingLeft: '24px',
68+
backgroundColor: 'white',
69+
cursor: 'pointer',
70+
color: '#212529',
71+
'&::before': (state.isSelected || state.isFocused) && {
72+
position: 'absolute',
73+
top: 'calc(50% - 9.6px)',
74+
left: '5.4px',
75+
width: '2px',
76+
height: '2px',
77+
content: '""',
78+
color: state.isSelected ? '#212529' : '#919599',
79+
boxShadow: '2px 2px 0 .020em, 4px 2px 0 .020em, 2px 4px 0 .020em, 4px 4px 0 .020em, 6px 4px 0 .020em, 8px 4px 0 .020em, 2px 6px 0 .020em, 4px 6px 0 .020em, 6px 6px 0 .020em, 8px 6px 0 .020em, 10px 6px 0 .020em, 2px 8px 0 .020em, 4px 8px 0 .020em, 6px 8px 0 .020em, 8px 8px 0 .020em, 10px 8px 0 .020em, 12px 8px 0 .020em, 2px 10px 0 .020em, 4px 10px 0 .020em, 6px 10px 0 .020em, 8px 10px 0 .020em, 10px 10px 0 .020em, 2px 12px 0 .020em, 4px 12px 0 .020em, 6px 12px 0 .020em, 8px 12px 0 .020em, 2px 14px 0 .020em, 4px 14px 0 .020em',
80+
},
81+
});
82+
},
83+
};
84+
85+
module.exports = themeStyles;

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "react-select-nes-css-theme",
3+
"version": "1.0.0",
4+
"description": "A React-Select theme created to match NES.css styles",
5+
"main": "index.js",
6+
"repository": {
7+
"url": "https://github.com/Divoolej/react-select-nes-css-theme",
8+
"type": "git"
9+
},
10+
"author": "Wojciech Olejnik <[email protected]>",
11+
"license": "MIT",
12+
"keywords": ["css", "nes.css", "react-select", "theme", "retro", "nes"],
13+
"bugs": "https://github.com/Divoolej/react-select-nes-css-theme/issues"
14+
}

0 commit comments

Comments
 (0)