@@ -15,14 +15,15 @@ Clicking on a `radio-button` will set `groupValue` to its `value`.
1515The block form emits a label wrapping the input element and any elements passed to the block.
1616
1717** Template:**
18+
1819``` javascript
19- {{#radio - button
20- value= " blue"
21- groupValue= color
22- changed= (action " colorChanged" )
23- }}
24- < span> Blue< / span>
25- {{ / radio - button}}
20+ < RadioButton
21+ @ value= " blue"
22+ @ groupValue= color
23+ @ changed= {{ this . colorChanged }}
24+ >
25+ < span> Blue< / span>
26+ < / RadioButton >
2627
2728/* results in */
2829< label id= " ember346" class = " ember-view ember-radio-button" >
@@ -36,12 +37,12 @@ The block form emits a label wrapping the input element and any elements passed
3637If you want more control over the DOM, the non-block form only emits a single input element
3738
3839``` javascript
39- {{radio - button
40- value= " green"
41- groupValue= color
42- name= " colors"
43- changed= (action " colorChanged" )
44- }}
40+ < RadioButton
41+ @ value= " green"
42+ @ groupValue= {{ this . color }}
43+ @ name= " colors"
44+ @ changed= {{ this . colorChanged }}
45+ / >
4546
4647/* results in */
4748< input id= " ember345" class = " ember-view" type= " radio" value= " green" >
@@ -53,43 +54,42 @@ If you want more control over the DOM, the non-block form only emits a single in
5354
5455## Supported Ember Versions
5556
56- | ember-radio-button version | supports |
57- | ----------------------------| --------------------------|
58- | 2.x | Ember 2.8+ |
59- | 1.x | Ember 1.11+ |
57+ | ember-radio-button version | supports |
58+ | -------------------------- | ----------- |
59+ | 3.x | Ember 3.16+ |
60+ | 2.x | Ember 2.8+ |
61+ | 1.x | Ember 1.11+ |
6062
6163## Properties
6264
63- * Required:*
64-
65- | name | type | description |
66- | ------------| -----------| ------------------------|
67- | value | any | the unique value represented by the radio button |
68- | groupValue | any | the value representing a radio group's current value. supply the same ` groupValue ` to every radio-button in a group |
69-
65+ _ Required:_
7066
71- * Optional:*
67+ | name | type | description |
68+ | ---------- | ---- | ------------------------------------------------------------------------------------------------------------------- |
69+ | value | any | the unique value represented by the radio button |
70+ | groupValue | any | the value representing a radio group's current value. supply the same ` groupValue ` to every radio-button in a group |
7271
73- | name | type | description |
74- | ------------| -----------| ------------------------|
75- | ariaDescribedby | string | applies an ` aria-describedby ` attribute to the input element |
76- | ariaLabelledby | string | applies an ` aria-labelledby ` attribute to the input element |
77- | autofocus | boolean | applies the ` autofocus ` property to the input element |
78- | checkedClass | string | classname to apply to the ` label ` element when the input it wraps is checked. block form only. defaults to ` "checked" ` |
79- | classNames | string | applies additional classnames to the ` label ` element (block form only) |
80- | disabled | boolean | applies the ` disabled ` property to the input element |
81- | name | string | applies the ` name ` property to the input element |
82- | radioClass | string | applies additional classnames to the input element |
83- | radioId | string | sets the ` id ` of the input element and the ` for ` property to the label element |
84- | required | boolean | applies the ` required ` property to the input element |
85- | tabindex | number | applies a ` tabindex ` property to the input element |
72+ _ Optional:_
8673
87- * Actions:*
74+ | name | type | description |
75+ | --------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
76+ | ariaDescribedby | string | applies an ` aria-describedby ` attribute to the input element |
77+ | ariaLabelledby | string | applies an ` aria-labelledby ` attribute to the input element |
78+ | autofocus | boolean | applies the ` autofocus ` property to the input element |
79+ | checkedClass | string | classname to apply to the ` label ` element when the input it wraps is checked. block form only. defaults to ` "checked" ` |
80+ | classNames | string | applies additional classnames to the ` label ` element (block form only) |
81+ | disabled | boolean | applies the ` disabled ` property to the input element |
82+ | name | string | applies the ` name ` property to the input element |
83+ | radioClass | string | applies additional classnames to the input element |
84+ | radioId | string | sets the ` id ` of the input element and the ` for ` property to the label element |
85+ | required | boolean | applies the ` required ` property to the input element |
86+ | tabindex | number | applies a ` tabindex ` property to the input element |
8887
89- | name | description |
90- | ------------| ------------------------|
91- | changed | fires when user interaction causes a radio-button to update ` groupValue ` |
88+ _ Actions:_
9289
90+ | name | description |
91+ | ------- | ------------------------------------------------------------------------ |
92+ | changed | fires when user interaction causes a radio-button to update ` groupValue ` |
9393
9494## Installing
9595
@@ -106,23 +106,23 @@ Applications not using htmlbars should use version 0.1.3 or the `pre-htmlbars` b
106106
107107## Collaborating on this repo
108108
109- * ` git clone <repository-url> ` this repository
110- * ` cd ember-radio-button `
111- * ` npm install `
109+ - ` git clone <repository-url> ` this repository
110+ - ` cd ember-radio-button `
111+ - ` npm install `
112112
113113## Running
114114
115- * ` ember serve `
116- * Visit your app at [ http://localhost:4200 ] ( http://localhost:4200 ) .
115+ - ` ember serve `
116+ - Visit your app at [ http://localhost:4200 ] ( http://localhost:4200 ) .
117117
118118## Running Tests
119119
120- * ` npm test ` (Runs ` ember try:each ` to test your addon against multiple Ember versions)
121- * ` ember test `
122- * ` ember test --server `
120+ - ` npm test ` (Runs ` ember try:each ` to test your addon against multiple Ember versions)
121+ - ` ember test `
122+ - ` ember test --server `
123123
124124## Building
125125
126- * ` ember build `
126+ - ` ember build `
127127
128128For more information on using ember-cli, visit [ https://ember-cli.com/ ] ( https://ember-cli.com/ ) .
0 commit comments