0.2.2 • Published 2 years ago

mik-dropdown v0.2.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

mik-dropdown

installation

npm install mik-dropdown

Usage

import { useState } from "react";
import Dropdown from "mik-dropdown/dist/Dropdown";

function Example() {
  const [color, setColor] = useState("");
  const options = [
    { value: "green", label: "Green" },
    { value: "blue", label: "Blue" },
    { value: "red", label: "Red" },
    { value: "yellow", label: "Yellow" },
    { value: "orange", label: "Orange" },
    { value: "pink", label: "Pink" },
    { value: "purple", label: "Purple" },
    { value: "grey", label: "Grey" },
  ];

  return (
    <div>
      <Dropdown
        label="Please choose a color"
        options={options}
        onChange={(value) => setColor(value)}
      />
    </div>
  );
}
0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago