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

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

Package Sidebar

Install

npm i @politiet/pds-select

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

9.57 kB

Total Files

9

Last publish

Collaborators

  • digitalcop
  • ninhdo
  • espen.geitsund