github.com/jojicluka/consul-api@v1.4.5/ui-v2/lib/block-slots/addon/components/yield-slot.js (about)

     1  import { computed, get } from '@ember/object';
     2  import Component from '@ember/component';
     3  import layout from '../templates/components/yield-slot';
     4  import Slots from '../mixins/slots';
     5  const YieldSlotComponent = Component.extend({
     6    layout,
     7    tagName: '',
     8    _parentView: computed(function() {
     9      return this.nearestOfType(Slots);
    10    }),
    11    isActive: computed('_parentView._slots.[]', '_name', function() {
    12      return get(this, '_parentView._slots').includes(get(this, '_name'));
    13    }),
    14  });
    15  
    16  YieldSlotComponent.reopenClass({
    17    positionalParams: ['_name', '_blockParams'],
    18  });
    19  
    20  export default YieldSlotComponent;