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/modal-tab.js.es6
Joffrey JAFFEUX 04a63cfaaa
[WIP] FEATURE: merge share and invite actions together (#7021)
This commit also:
- removes [+ New Topic] behaviour from share, this feature has been duplicated in composer actions, months ago
- introduces our new experimental spacing standard for css: eg: `s(2)`
- introduces a new panel UI for modals
2019-02-20 15:42:44 +01:00

18 lines
486 B
JavaScript

import { propertyEqual } from "discourse/lib/computed";
export default Ember.Component.extend({
tagName: "li",
classNames: ["modal-tab"],
panel: null,
selectedPanel: null,
panelsLength: null,
classNameBindings: ["isActive", "singleTab", "panel.id"],
singleTab: Ember.computed.equal("panelsLength", 1),
title: Ember.computed.alias("panel.title"),
isActive: propertyEqual("panel.id", "selectedPanel.id"),
click() {
this.onSelectPanel(this.get("panel"));
}
});