feat: added dropdown component

This commit is contained in:
Daniel
2023-03-23 02:41:54 +03:30
parent e5e2a615fc
commit f80113c487
20 changed files with 152 additions and 54 deletions
@@ -1,4 +1,4 @@
import useCollectionSlice from "@/store/collections";
import useCollectionStore from "@/store/collections";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import CreatableSelect from "react-select/creatable";
@@ -6,7 +6,7 @@ import { styles } from "./styles";
import { Options } from "./types";
export default function ({ onChange }: any) {
const { collections } = useCollectionSlice();
const { collections } = useCollectionStore();
const router = useRouter();
const [options, setOptions] = useState<Options[]>([]);
+2 -2
View File
@@ -1,11 +1,11 @@
import useTagSlice from "@/store/tags";
import useTagStore from "@/store/tags";
import { useEffect, useState } from "react";
import CreatableSelect from "react-select/creatable";
import { styles } from "./styles";
import { Options } from "./types";
export default function ({ onChange }: any) {
const { tags } = useTagSlice();
const { tags } = useTagStore();
const [options, setOptions] = useState<Options[]>([]);