To use the Select mate component in your project, simply follow these steps:
- clone the repository in the same directory of you project:
git clone https://github.com/theorlan2/React-SelectMate.git
-
Install the package using yarn or npm:
yarn add ../selectmate
-
Import the SelectMate component in your React file:
import { SelectMate } from 'selectmate';
-
Use the component in your JSX:
<SelectMate options={[...]} onChange={(value) => console.log(value)} />
Replace options
with an array of objects that define each option, where the key is the value and the value is the display text for that option.
To run the component using storybook, you can run
In the project directory. This runs the app in the development mode.
Open http://localhost:6006 to view it in the browser the demo example.
Launches the test runner in the interactive watch mode.