@politiet/pds-radio
v0.2.0
Published
Radioknapp-komponent i Politiets Designsystem.
Downloads
30
Readme
import { useState } from "react";
const [value, setValue] = useState("0");
<div
id="radio-test-1"
style={{
display: "flex",
"flex-direction": "column",
}}
>
<RadioButton
name="radio-0"
id="radio-0"
label={"Example - Option 1"}
checked={value === "0"}
onChange={() => setValue("0")}
/>
<RadioButton
name="radio-1"
id="radio-1"
label={"Example - Option 1"}
checked={value === "1"}
onChange={() => setValue("1")}
/>
<RadioButton
name="radio-2"
id="radio-2"
label={"Example - Option 1"}
checked={value === "2"}
onChange={() => setValue("2")}
/>
</div>;