Skip to content

Commit

Permalink
fix: style issues and created readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
melihsahtulek committed Aug 8, 2023
1 parent d3b3f30 commit a564bbd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Binary file added public/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added readme.md
Empty file.
16 changes: 11 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import MultiSelect, { Option } from '@/components/MultiSelect';
import { useState } from 'react';

const options = [
{
Expand Down Expand Up @@ -28,21 +29,26 @@ const options = [
];

function App() {
const [selectedItems, setSelectedItems] = useState([]);

return (
<div>
MultiSelect: true, searchable: true
<b>MultiSelect: true, searchable: true</b>
<MultiSelect
searchable={true}
multiSelectable={true}
disabled={false}
options={options}
onChangeState={(data: Option[]) => {
console.log('***Selected Items***');
Object.values(data).forEach((elem) => {
console.log(elem);
});
setSelectedItems(data as never);
}}
/>
<br />
<pre>{JSON.stringify(selectedItems, null, 2)}</pre>
<br />
<b>
dev. by <a href="https://github.com/melihsahtulek">melihsahtulek</a>
</b>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ body {
font-size: inherit;
line-height: 1.15;
padding: 2.5rem;
font-weight: 500;
}

0 comments on commit a564bbd

Please sign in to comment.