@kocierik/dropify
v1.0.0
Published
<h1 align="center"> <br> <img width="200px" src="https://user-images.githubusercontent.com/41591336/219984344-12198766-c9c8-44e0-a057-a6dac7191df2.png" alt="useWorker" title="useWorker() Use web workers with react hook" /> <br> </h1>
Downloads
1
Readme
🎨 Features
- Run asynchronous function
- Supports Promises
- Typescript support
💾 Install
- @latest
npm install --save @kocierik/dropify
🔨 Import
import { DropDown, Setting } from "@kocierik/dropify";
📙 Documents
🐾 Usage DropDown
import { DropDown } from '@kocierik/dropify';
const App = () => {
const list = ['a', 'b', 'c', 'd']
const [filter, setFilter] = React.useState([])
return (
<div className='flex flex-1 p-5'>
<div>
<DropDown label={'label'} list={list} filter={filter} setFilter={setFilter} />
</div>
<div className='p-5 flex-row flex'>
{filter.map((item, index) => {
return <div key={index} className='p-5'>{item}</div>;
})
}
</div>
</div>
);
};
🐾 Usage Setting
import { Setting } from '@kocierik/dropify';
const App = () => {
const setting: Isetting[] = [{
label: 'helper',
handler: () => {
alert('help!')
}
}, {
label: 'Click me',
handler: () => {
alert('clicked!')
}
}
]
return (
<div className='flex flex-1 p-5'>
<Setting settings={setting} />
</div>
);
};
🖼 Live Demo
🔧 Roadmap
- [] Add more components
- [] Add more style
- [] Add animation
🌏 Contribute? Bug? New Feature?
The library is experimental so if you find a bug or would like to request a new feature, open an issue