This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/select-box/select-box-row.js.es6
Joffrey JAFFEUX ccf5005feb FEATURE: uses select-box for topic-notifications-button component
- Introduces ComponentConnector to use a component inside a widget
- Use css to set size of components instead of properties
- Smarted positionning
- Style tweaks
2017-09-06 16:58:00 +02:00

37 lines
757 B
JavaScript

import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
layoutName: "components/select-box/select-box-row",
classNames: "select-box-row",
tagName: "li",
attributeBindings: ["title"],
classNameBindings: ["isHighlighted:is-highlighted"],
@computed("titleForRow")
title(titleForRow) {
return titleForRow(this);
},
@computed("templateForRow")
template(templateForRow) {
return templateForRow(this);
},
@computed("shouldHighlightRow", "value")
isHighlighted(shouldHighlightRow) {
return shouldHighlightRow(this);
},
mouseEnter() {
this.sendAction("onHover", this.get("content"));
},
click() {
this.sendAction("onSelect", this.get("content"));
}
});