hummingbird-me/hummingbird

View on GitHub
frontend/app/components/radio-button.js

Summary

Maintainability
A
0 mins
Test Coverage
import Ember from 'ember';

export default Ember.Component.extend({
  tagName: 'input',
  type: 'radio',
  attributeBindings: ['type', 'htmlChecked:checked', 'value', 'name', 'id'],

  htmlChecked: function(){
    return this.get('value') === this.get('checked');
  }.property('value', 'checked'),

  change: function(){
    this.set('checked', this.get('value'));
  }
});