0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6
2020-03-24 20:35:46 +11:00

14 Zeilen
Kein EOL
541 B
JavaScript

import { connectors } from '../lib/custom-wizard';
import { gt, or, alias } from "@ember/object/computed";
import { computed, observes} from "@ember/object";
export default Ember.Component.extend({
classNameBindings: [':input-pair', 'hasConnector::no-connector'],
connectors: connectors,
hasConnector: or('options.enableConnectors', 'connectorKey'),
firstPair: gt('pair.index', 0),
showRemove: alias('firstPair'),
showJoin: computed('pair.pairCount', function() {
return this.pair.index < (this.pair.pairCount - 1);
})
})