@politiet/pds-select
v0.1.1
Published
Nedtrekksfelt-komponent i Politiets Designsystem.
Downloads
6
Readme
import { useState } from "react";
const [value, setValue] = useState("");
<div
id="select-example"
style={{
display: "flex",
"flexDirection": "column",
}}
>
<Select
label={"Example - Select with default option"}
name="select-0"
id="select-0"
value={value}
onChange={(e) => setValue(e.target.value)}
options={
{
items: [
{
value: "1",
text: "Option 1"
},
{
value: "2",
text: "Option 2"
},
{
value: "3",
text: "Option 3"
},
]
}
}
defaultOptionText={"Default option"}
/>
</div>;