@politiet/pds-radio
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published
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>;

Dependents (0)

Package Sidebar

Install

npm i @politiet/pds-radio

Weekly Downloads

2

Version

0.2.0

License

ISC

Unpacked Size

4.4 kB

Total Files

9

Last publish

Collaborators

  • digitalcop
  • ninhdo
  • espen.geitsund