1.0.1 • Published 5 years ago
react-absolute-selector v1.0.1
React Absolute Selector
An "absolute" selector for React
A fixed-positioned, globally accessible, movable and minimal selector component
Installation
In order to include "absolute selector" to your project with npm
, run:
npm install --save react-absolute-selector
Or with yarn
:
yarn add react-absolute-selector
Usage
Import the library with its css by just adding two lines of code :
import {AbsoluteSelector} from 'react-absolute-selector'
import 'react-absolute-selector/build/index.css';
Then, add it to any component you want:
<AbsoluteSelector
title={<FormattedMessage
id="language.settings.title"/>}
form={{
onChange: handleOnChange,
name: 'lang',
value: lang,
elements: [{
title: 'Türkçe',
value: 'tr',
}, {
title: 'English',
value: 'en',
}],
}}
/>