input component ui docs (#2873)

This commit is contained in:
Nimra Ahmed
2023-12-09 14:39:50 +05:00
committed by GitHub
parent 9d4ed323a7
commit 3913e1b6a0
14 changed files with 467 additions and 9 deletions

View File

@ -0,0 +1,26 @@
import { RecoilRoot } from "recoil";
import { Select } from "@/ui/input/components/Select";
import { IconComponent } from "@/ui/display/icon/types/IconComponent";
export const MyComponent = () => {
const handleSelectChange = (selectedValue) => {
console.log(`Selected: ${selectedValue}`);
};
return (
<RecoilRoot>
<Select
className
disabled={false}
dropdownScopeId="exampleDropdown"
label="Select an option"
onChange={handleSelectChange}
options={[
{ value: "option1", label: "Option A", Icon: IconComponent },
{ value: "option2", label: "Option B", Icon: IconComponent },
]}
value="option1"
/>
</RecoilRoot>
);
};