mirror of
https://github.com/flarum/framework.git
synced 2025-06-02 05:23:12 +08:00
Move forum ember app into a subdir, preparing for admin app to exist alongside
This commit is contained in:
19
ember/forum/app/components/ui/switch-input.js
Normal file
19
ember/forum/app/components/ui/switch-input.js
Normal file
@ -0,0 +1,19 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
/**
|
||||
A toggle switch.
|
||||
*/
|
||||
export default Ember.Component.extend({
|
||||
layoutName: 'components/ui/switch-input',
|
||||
classNames: ['checkbox', 'checkbox-switch'],
|
||||
|
||||
label: '',
|
||||
toggleState: true,
|
||||
|
||||
didInsertElement: function() {
|
||||
var component = this;
|
||||
this.$('input').on('change', function() {
|
||||
component.get('changed')($(this).prop('checked'), component);
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user