You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A React-Select theme created to match NES.css styles
4
+
#### A lightweight (zero-dependency) [React-Select](https://github.com/JedWatson/react-select) theme created to match [NES.css](https://github.com/nostalgic-css/NES.css) styles.
5
+
6
+

7
+
8
+
#### Installation
9
+
Use either
10
+
```bash
11
+
yarn add react-select-nes-css-theme
12
+
```
13
+
or
14
+
```bash
15
+
npm install react-select-nes-css-theme
16
+
```
17
+
18
+
#### Usage
19
+
Simply import the theme object and pass it to the `styles` prop of the `Select` component.
20
+
```javascript
21
+
importReact, { useState } from'react';
22
+
importSelectfrom'react-select';
23
+
24
+
importnesThemefrom'react-select-nes-css-theme'; // HERE: Import the theme object
25
+
26
+
constStyledSelectComponent= () => {
27
+
const [value, setValue] =useState();
28
+
29
+
return (
30
+
<Select
31
+
value={value}
32
+
styles={nesTheme} // HERE: Pass the theme object as a prop
33
+
onChange={setValue}
34
+
options={[
35
+
{ value:0, label: To be' },
36
+
{ value: 1, label: 'Not to be' },
37
+
]}
38
+
/>
39
+
);
40
+
};
41
+
42
+
export default StyledSelectComponent;
43
+
```
44
+
45
+
## License
46
+
47
+
MIT Licensed. Copyright (c) Wojciech Olejnik 2018.
0 commit comments