diff --git a/packages/wow-ui/src/components/DropDown/context/DropDownContext.ts b/packages/wow-ui/src/components/DropDown/context/DropDownContext.ts index 09d53349..7757ad7f 100644 --- a/packages/wow-ui/src/components/DropDown/context/DropDownContext.ts +++ b/packages/wow-ui/src/components/DropDown/context/DropDownContext.ts @@ -3,9 +3,9 @@ import { createContext } from "react"; import type useDropDownState from "../../../hooks/useDropDownState"; import useSafeContext from "../../../hooks/useSafeContext"; -export const DropDownContext = createContext | null>(null); +export const DropDownContext = createContext< + (ReturnType & { dropdownId: string }) | null +>(null); export const useDropDownContext = () => { const context = useSafeContext(DropDownContext); diff --git a/packages/wow-ui/src/components/DropDown/index.tsx b/packages/wow-ui/src/components/DropDown/index.tsx index 56743aff..47cf5803 100644 --- a/packages/wow-ui/src/components/DropDown/index.tsx +++ b/packages/wow-ui/src/components/DropDown/index.tsx @@ -97,11 +97,10 @@ const DropDown = ({ value, defaultValue, onChange, - dropdownId, }); return ( - + void; - dropdownId?: string; } const useDropDownState = ({ value, defaultValue, onChange, - dropdownId, }: DropDownStateProps) => { const [selectedValue, setSelectedValue] = useState(""); const [open, setOpen] = useState(false); @@ -47,7 +45,6 @@ const useDropDownState = ({ focusedValue, setFocusedValue, handleSelect, - dropdownId, }; };