-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from mike-north/more-tests
Clickable action support applied broadly
- Loading branch information
Showing
5 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import Ember from 'ember'; | ||
import BaseToggleComponent from './-base-toggle-component'; | ||
import layout from '../templates/components/mdl-radio'; | ||
|
||
const { computed, computed: { oneWay } } = Ember; | ||
|
||
export default BaseToggleComponent.extend({ | ||
primaryClassName: 'radio', | ||
layout, | ||
checked: false, | ||
name: oneWay('_defaultName'), | ||
|
||
didInsertElement() { | ||
this._super(...arguments); | ||
let mdlradio = new window.MaterialRadio(this.get('element')); | ||
this.element.MaterialRadio = mdlradio; | ||
this.set('_mdlComponent', mdlradio); | ||
} | ||
}, | ||
|
||
_defaultName: computed('elementId', function() { | ||
return `${this.get('elementId')}-name`; | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<input type="radio" id={{_inputId}} class="mdl-radio__button" name="options" value={{value}} disabled={{disabled}} checked={{checked}} /> | ||
<input type="radio" id={{_inputId}} class="mdl-radio__button" name={{name}} value={{value}} disabled={{disabled}} checked={{checked}} /> | ||
<span class="mdl-radio__label">{{label}}{{yield}}</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters