0.2.1 • Published 7 years ago

react-checked v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

ReactRadio v0.2.1

New in v0.2.*

  • CheckboxGroup component. This component allows you select several values and handle them in onChange function

  • onChange callback function. Funttion, witch handle change event.

Installation

npm install --save react-checked

Usage

import

import { RadioGroup, CheckboxGroup } from "react-checked";

RadioGroup

const options = [{
  text: "One",
  value: "1"
}, {
  text: "Two",
  value: "2"
}, {
  text: "Three",
  value: "3"
}];

ReactDOM.render(
  <RadioGroup
    value="2"
    onChange={(value) => console.log(value)} // "2"
    color="black"
    items={options} />,
  document.querySelector(".root")
);

CheckboxGroup

const options = [{
  text: "One",
  value: "1"
}, {
  text: "Two",
  value: "2"
}, {
  text: "Three",
  value: "3"
}];

ReactDOM.render(
  <CheckboxGroup
    values={["1", "3"]}
    onChange={(values) => console.log(values)} // ["1", "3"]
    color="green"
    items={options} />,
  document.querySelector(".root")
);

Options

PropertyTypeValuesDefault
colorstring"orange", "red", "green", "blue", "black""blue"
onChangefunctioncallback function for hadling change event() => { return }
0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.94

7 years ago

0.0.93

7 years ago

0.0.92

7 years ago

0.0.91

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago