All files / addon/components/nucleus-modal footer.js

40% Statements 2/5
100% Branches 0/0
100% Functions 0/0
40% Lines 2/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91                                                                        10x                                                                               1x                            
import Component from '@ember/component';
import defaultProp from '@freshworks/core/utils/default-decorator';
import { classNames, tagName, classNameBindings, layout as templateLayout } from '@ember-decorators/component';
import { notEmpty } from '@ember/object/computed';
import layout from '../../templates/components/nucleus-modal/footer';
 
/**
  Footer Usage:
  @class Footer
  @namespace Components
  @extends Ember.Component
  @public
*/
@templateLayout(layout)
@tagName('form')
@classNames('nucleus-modal__footer')
@classNameBindings('isSticky:sticky')
class Footer extends Component{
  /**
  * closeTitle
  *
  * @field closeTitle
  * @type null
  * @public
  */
  @defaultProp
  closeTitle = null;
 
  /**
  * isSticky
  *
  * @field isSticky
  * @type boolean
  * @public
  */
  @defaultProp
 isSticky = true;
 
  /**
  * hasCloseButton
  *
  * @field hasCloseButton
  * @type function
  * @private
  */
  @notEmpty('closeTitle')
  hasCloseButton;
 
  /**
  * submitTitle
  *
  * @field submitTitle
  * @type null
  * @public
  */
  @defaultProp
  submitTitle = null;
 
  /**
  * hasSubmitButton
  *
  * @field hasSubmitButton
  * @type function
  * @private
  */
  @notEmpty('submitTitle')
  hasSubmitButton;
 
  /**
  * submitDisabled
  *
  * @field submitDisabled
  * @type boolean
  * @public
  */
  @defaultProp
  submitDisabled = false;
 
  /**
  * type
  *
  * @field type
  * @type string
  * @public
  */
  @defaultProp
  type = 'primary';
}
 
export default Footer;