0.0.12 • Published 1 year ago

react-radio-ts v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-radio-ts

React radio.

Live Demo

Installation:

npm install react-radio-ts

or

yarn add -D react-radio-ts

Usage :

Add RadioGroup to your component:

import React, { FunctionComponent, useState } from "react";
import ReactDOM from "react-dom/client";
import { RadioGroup } from "react-radio-ts";

const options = [
  {
    label: "test1",
    value: "1",
  },
  {
    label: "test2",
    value: "2",
  },
  {
    label: "test3",
    value: "3",
  },
];
const Example: FunctionComponent = () => {
  const [value, setValue] = useState<string>("2");

  return (
    <div>
      <h2>React Radio TS default</h2>
      <RadioGroup
        direction="horizontal"
        name="group1"
        selectdValue={value}
        options={options}
        onChange={setValue}
      />
      <hr />
    </div>
  );
};
0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago