mirror of
https://github.com/flarum/framework.git
synced 2025-05-24 15:49:58 +08:00
Replace Ember app with Mithril app
This commit is contained in:
13
js/lib/components/select-input.js
Normal file
13
js/lib/components/select-input.js
Normal file
@ -0,0 +1,13 @@
|
||||
import Component from 'flarum/component'
|
||||
import icon from 'flarum/helpers/icon';
|
||||
|
||||
export default class SelectInput extends Component {
|
||||
view(ctrl) {
|
||||
return m('span.select-input', [
|
||||
m('select.form-control', {onchange: m.withAttr('value', this.props.onchange.bind(ctrl)), value: this.props.value}, [
|
||||
this.props.options.map(function(option) { return m('option', {value: option.key}, option.value) })
|
||||
]),
|
||||
icon('sort')
|
||||
])
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user