ember-radio-button
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -8,2 +8,3 @@ import Ember from 'ember'; | ||
classNameBindings: ['checked'], | ||
classNames: ['ember-radio-button'], | ||
@@ -10,0 +11,0 @@ checked: computed('groupValue', 'value', function(){ |
@@ -30,2 +30,3 @@ import Ember from 'ember'; | ||
this.set('classNameBindings', ['checked']); | ||
this.set('classNames', ['ember-radio-button']); | ||
} | ||
@@ -32,0 +33,0 @@ }), |
{ | ||
"name": "ember-radio-button", | ||
"version": "1.0.1", | ||
"description": "provides a radio-button component", | ||
"version": "1.0.2", | ||
"directories": { | ||
@@ -5,0 +6,0 @@ "doc": "doc", |
@@ -11,3 +11,3 @@ # ember-radio-button [![Build Status](https://travis-ci.org/yapplabs/ember-radio-button.svg?branch=master)](https://travis-ci.org/yapplabs/ember-radio-button) [![Ember Observer Score](http://emberobserver.com/badges/ember-radio-button.svg)](http://emberobserver.com/addons/ember-radio-button) | ||
Clicking on a `radio-button` will set `groupValue` to its `value`. | ||
Clicking on a `radio-button` will set `groupValue` to its `value`. | ||
@@ -36,3 +36,3 @@ The component exposes a `changed` action that allows you to do something | ||
<label id="ember346" class="ember-view"> | ||
<label id="ember346" class="ember-view ember-radio-button"> | ||
<input id="ember347" class="ember-view" type="radio" value="blue"> | ||
@@ -43,7 +43,20 @@ Blue | ||
See the dummy app and tests for more example usage | ||
You can additionally provide `disabled` `name` and `required` properties to a `radio-button` | ||
```javascript | ||
{{radio-button | ||
value="green" | ||
groupValue=color | ||
required=true | ||
disabled=true | ||
name="color"}} | ||
``` | ||
```html | ||
<input id="ember345" class="ember-view" type="radio" value="green" name="color" required disabled> | ||
``` | ||
## Installing | ||
`npm install ember-radio-button --save-dev` | ||
`ember install:addon ember-radio-button` | ||
@@ -56,3 +69,3 @@ ## Collaborating on this repo | ||
## Running | ||
## Running the dummy app | ||
@@ -59,0 +72,0 @@ * `ember server` |
@@ -14,3 +14,3 @@ import Ember from 'ember'; | ||
test('it renders', function() { | ||
expect(2); | ||
expect(3); | ||
@@ -22,2 +22,3 @@ var component = this.subject(); | ||
equal(component._state, 'inDOM'); | ||
equal(component.$().hasClass('ember-radio-button'), true, 'has ember-radio-button class'); | ||
}); | ||
@@ -24,0 +25,0 @@ |
@@ -220,2 +220,3 @@ import Ember from 'ember'; | ||
equal(component.$('input[type=radio]').length, 1); | ||
equal(component.$().hasClass('ember-radio-button'), true, 'has ember-radio-button class'); | ||
}); | ||
@@ -222,0 +223,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
473
81
26935
54
1