all files / addon/components/polaris-choice/ label.js

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53                                                                                                         
import Component from '@ember/component';
import layout from '../../templates/components/polaris-choice/label';
 
export default Component.extend({
  tagName: 'label',
  classNames: ['Polaris-Choice'],
  classNameBindings: ['labelHidden:Polaris-Choice--labelHidden'],
  attributeBindings: ['inputId:for'],
 
  layout,
 
  /**
   * ID of the input this label is for.
   *
   * @property inputId
   * @type {String}
   * @default: null
   * @public
   */
  inputId: null,
 
  /**
   * Label content for the choice this label belongs to.
   *
   * @property label
   * @type {String}
   * @default: null
   * @public
   */
  label: null,
 
  /**
   * Component to render for the label
   *
   * @property labelComponent
   * @type {String | Component}
   * @default null
   * @public
   */
  labelComponent: null,
 
  /**
   * Flag to hide the label
   *
   * @property labelHidden
   * @type {Boolean}
   * @default: false
   * @public
   */
  labelHidden: false,
});