This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
/** | |
`sq-dropdown-trigger` is intended to be used in `sq-dropdown`, it should not be used elsewhere. | |
*/ | |
export default Ember.Component.extend({ | |
classNames: ['dropdown__trigger'], | |
tagName: 'button', | |
classNameBindings: ['isActive:dropdown__trigger--is-active', 'isDisabled:dropdown__trigger--is-disabled'], | |
attributeBindings: ['isDisabled:disabled', 'tabindex', 'style'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
things: Ember.computed(function() { | |
return [{ name: 'one' }, { name: 'two' }]; | |
}), | |
actions: { | |
placeholderEnter(event) { | |
const placeholder = this.get('placeholder'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
walkthrough: Ember.inject.service(), | |
isVisible: Ember.computed('walkthrough.currentTooltipId', 'walkthrough.currentWalkthrough.id', 'walkthroughId', 'tooltipId', function() { | |
return this.get('walkthrough.currentTooltipId') === this.get('tooltipId') && | |
this.get('walkthrough.currentWalkthrough.id') === this.get('walkthroughId'); | |
}), | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
attributeBindings: ['type', 'checked'] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
toggleValue(newValue, isSelected) { | |
if (isSelected) { | |
this.send('addValue', newValue); | |
} else { | |
this.send('removeValue', newValue); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
onChange(newValue) { | |
this.sendAction('valueChanges', newValue); | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
timecardsWithDots: Ember.inject.service('squareup.timecards.my-service'), | |
timecardsWithSlashes: Ember.inject.service('squareup/timecards/my-service'), | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didInsertElement() { | |
Ember.run.scheduleOnce('afterRender', () => { | |
this.$('.foo').text(`the ${this.get('which')} one works`); | |
}); | |
} | |
}); |