Skip to content

A React-Select theme created to match NES.css styles

License

Notifications You must be signed in to change notification settings

Divoolej/react-select-nes-css-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

react-select-nes-css-theme

A lightweight (zero-dependency) React-Select theme created to match NES.css styles.

Installation

Use either

yarn add react-select-nes-css-theme

or

npm install react-select-nes-css-theme

Usage

Simply import the theme object and pass it to the styles prop of the Select component.

import React, { useState } from 'react';
import Select from 'react-select';

import nesTheme from 'react-select-nes-css-theme'; // HERE: Import the theme object

const StyledSelectComponent = () => {
  const [value, setValue] = useState();

  return (
    <Select
      value={value}
      styles={nesTheme} // HERE: Pass the theme object as a prop
      onChange={setValue}
      options={[
        { value: 0, label: 'To be' },
        { value: 1, label: 'Not to be' },
      ]}
    />
  );
};

export default StyledSelectComponent;

License

MIT Licensed. Copyright (c) Wojciech Olejnik 2018.

About

A React-Select theme created to match NES.css styles

Resources

License

Stars

Watchers

Forks

Packages

No packages published