1 | apeman-react-radio
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
9 | <a name="badges"></a>
|
10 |
|
11 | [![Build Status][bd_travis_shield_url]][bd_travis_url]
|
12 | [![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
|
13 | [![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
|
14 | [![npm Version][bd_npm_shield_url]][bd_npm_url]
|
15 | [![JS Standard][bd_standard_shield_url]][bd_standard_url]
|
16 |
|
17 | [bd_repo_url]: https://github.com/apeman-react-labo/apeman-react-radio
|
18 | [bd_travis_url]: http://travis-ci.org/apeman-react-labo/apeman-react-radio
|
19 | [bd_travis_shield_url]: http://img.shields.io/travis/apeman-react-labo/apeman-react-radio.svg?style=flat
|
20 | [bd_license_url]: https://github.com/apeman-react-labo/apeman-react-radio/blob/master/LICENSE
|
21 | [bd_codeclimate_url]: http://codeclimate.com/github/apeman-react-labo/apeman-react-radio
|
22 | [bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-react-labo/apeman-react-radio.svg?style=flat
|
23 | [bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-react-labo/apeman-react-radio.svg?style=flat
|
24 | [bd_gemnasium_url]: https://gemnasium.com/apeman-react-labo/apeman-react-radio
|
25 | [bd_gemnasium_shield_url]: https://gemnasium.com/apeman-react-labo/apeman-react-radio.svg
|
26 | [bd_npm_url]: http://www.npmjs.org/package/apeman-react-radio
|
27 | [bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-react-radio.svg?style=flat
|
28 | [bd_standard_url]: http://standardjs.com/
|
29 | [bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | <a name="description"></a>
|
36 |
|
37 | apeman react package for radio component.
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | <a name="overview"></a>
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | <a name="sections"></a>
|
52 |
|
53 |
|
54 |
|
55 | <a name="section-doc-guides-01-installation-md"></a>
|
56 | Installation
|
57 | -----
|
58 |
|
59 | ```bash
|
60 | $ npm install apeman-react-radio --save
|
61 | ```
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | <a name="section-doc-guides-02-demo-md"></a>
|
69 | Demo
|
70 | -----
|
71 |
|
72 | [Live demo][demo_url] is hosted on GitHub Pages.
|
73 |
|
74 | [![Demo Image](./doc/images/screenshot.png)][demo_url]
|
75 |
|
76 | [demo_url]: http://apeman-react-labo.github.io/apeman-react-radio/demo/demo.html
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | <a name="section-doc-guides-03-usage-md"></a>
|
84 | Usage
|
85 | ---------
|
86 |
|
87 | ```jsx
|
88 | 'use strict'
|
89 |
|
90 | import React from 'react'
|
91 | import {ApRadio, ApRadioStyle} from 'apeman-react-radio'
|
92 |
|
93 | const html = (
|
94 | <html>
|
95 | <head>
|
96 | <ApRadioStyle/>
|
97 | </head>
|
98 | <body>
|
99 | <div>
|
100 | <ApRadio name="favor" value="orange" title="I like orange." onChange={handleChange}/>,
|
101 | <ApRadio name="favor" value="apple" title="I like apple." onChange={handleChange}/>
|
102 | </div>
|
103 | </body>
|
104 | </html>
|
105 | )
|
106 |
|
107 | ```
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | <a name="section-doc-guides-04-components-md"></a>
|
116 | Components
|
117 | -----
|
118 |
|
119 |
|
120 | ### ApRadioGroup
|
121 |
|
122 | **Props**
|
123 |
|
124 | | Name | Type | Default | Description |
|
125 | | ---- | ---- | ------- | ----------- |
|
126 | | prefix | string | null | Document id prefix |
|
127 | | name | string | null | Name of Radio input |
|
128 | | options | object | {} | Value and label titles |
|
129 | | checked | object | {} | Checked state for each values |
|
130 | | onChange | func | null | Handle for change event |
|
131 | | icon | string | ApRadio.DEFAULT_ICON | Icon class name for normal state |
|
132 | | checkedIcon | string | ApRadio.DEFAULT_CHECKED_ICON | Icon class name for checked state |
|
133 | | title | | '' | |
|
134 |
|
135 | ### ApRadioStyle
|
136 |
|
137 | **Props**
|
138 |
|
139 | | Name | Type | Default | Description |
|
140 | | ---- | ---- | ------- | ----------- |
|
141 | | scope | bool | false | |
|
142 | | style | object | {} | |
|
143 | | highlightColor | string | '#38E' | |
|
144 |
|
145 | ### ApRadio
|
146 |
|
147 | **Props**
|
148 |
|
149 | | Name | Type | Default | Description |
|
150 | | ---- | ---- | ------- | ----------- |
|
151 | | id | string | null | |
|
152 | | name | string | null | |
|
153 | | value | string | null | |
|
154 | | title | string | '' | |
|
155 | | checked | bool | false | |
|
156 | | onChange | func | null | |
|
157 | | icon | string | 'ion ion-ios-circle-outline' | |
|
158 | | checkedIcon | string | 'ion ion-ios-circle-filled' | |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 | <a name="license"></a>
|
170 |
|
171 | License
|
172 | -------
|
173 | This software is released under the [MIT License](https://github.com/apeman-react-labo/apeman-react-radio/blob/master/LICENSE).
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 | <a name="links"></a>
|
180 |
|
181 | Links
|
182 | ------
|
183 |
|
184 | + [apeman](https://github.com/apeman-labo/apeman)
|
185 | + [apeman-react-labo](https://github.com/apeman-react-labo)
|
186 | + [React](https://facebook.github.io/react/)
|
187 |
|
188 |
|