0.0.12 • Published 2 years ago

react-radio-ts v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago