apeman-react-radio
v4.0.5
Published
apeman react package for radio component.
Downloads
140
Maintainers
Readme
apeman-react-radio
apeman react package for radio component.
Installation
$ npm install apeman-react-radio --saveDemo
Live demo is hosted on GitHub Pages.
Usage
'use strict'
import React from 'react'
import {ApRadio, ApRadioStyle} from 'apeman-react-radio'
const html = (
<html>
<head>
<ApRadioStyle/>
</head>
<body>
<div>
<ApRadio name="favor" value="orange" title="I like orange." onChange={handleChange}/>,
<ApRadio name="favor" value="apple" title="I like apple." onChange={handleChange}/>
</div>
</body>
</html>
)
Components
ApRadioGroup
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | prefix | string | uuid.v4() | | Document id prefix | | name | string | null | | Name of Radio input | | options | object | {} | | Value and label titles | | checked | object | {} | | Checked state for each values | | onChange | func | null | | Handle for change event | | icon | string | ApRadio.DEFAULT_ICON | | Icon class name for normal state | | checkedIcon | string | ApRadio.DEFAULT_CHECKED_ICON | | Icon class name for checked state | | title | | '' | | |
ApRadioStyle
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- |
ApRadio
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | id | string | null | | Element id of the radio box | | name | string | null | | Name of the radio box | | value | string | null | | value of the radio box | | title | string | '' | | Title text | | checked | bool | false | | Checked or not | | onChange | func | null | | Handler for change event | | icon | string | 'ion ion-ios-circle-outline' | | Class name for icon | | checkedIcon | string | 'ion ion-ios-circle-filled' | | Class name for checked icon |
License
This software is released under the MIT License.

