Skip to content
Snippets Groups Projects
Commit f570d5ce authored by Moritz Stückler's avatar Moritz Stückler :cowboy:
Browse files

feat: add react-select

parent 9f635c02
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -2,6 +2,7 @@ import React from 'react';
import { usePoiData, useStore } from '../../hooks';
import ListElement from './ListElement';
import SidebarContainer from './SidebarContainer';
import Select from 'react-select';
const SidebarListView: React.FC = () => {
const { data } = usePoiData();
......@@ -9,8 +10,24 @@ const SidebarListView: React.FC = () => {
const setHoveredPoi = useStore((state) => state.setHoveredPoi);
const setSelectedPoi = useStore((state) => state.setSelectedPoi);
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' },
];
return (
<SidebarContainer>
<div className="p-4">
<Select
defaultValue={[options[2], options[3]]}
isMulti
name="pois"
options={options}
className="basic-multi-select"
classNamePrefix="select"
/>
</div>
<h1 className="text-xl font-medium title-font m-4 text-gray-900 mb-2">{data?.length} Orte:</h1>
{data?.map((poi) => (
<ListElement
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment