mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 16:12:45 +08:00
21 lines
522 B
JavaScript
21 lines
522 B
JavaScript
export default Discourse.View.extend({
|
|
tagName: 'button',
|
|
classNameBindings: [':btn', ':standard', 'dropDownToggle'],
|
|
attributeBindings: ['title', 'data-toggle', 'data-share-url'],
|
|
|
|
title: function() {
|
|
return I18n.t(this.get('helpKey') || this.get('textKey'));
|
|
}.property('helpKey'),
|
|
|
|
text: function() {
|
|
return I18n.t(this.get('textKey'));
|
|
}.property('textKey'),
|
|
|
|
render: function(buffer) {
|
|
if (this.renderIcon) {
|
|
this.renderIcon(buffer);
|
|
}
|
|
buffer.push(this.get('text'));
|
|
}
|
|
});
|