Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@zestia/ember-modal-dialog
Advanced tools
This addon provides a simple Modal Dialog component.
The component can be animated in and out using class names that are added to the element during its set up and tear down phase.
Additionally, it can be set into a loading state which is useful if the modal dialog needs to wait for some data before it can display.
ember install @zestia/ember-modal-dialog
The modal dialog component isn't designed to be used on its own, but rather wrapped with a parent component.
// my-modal/component.js
export default class MyModal extends Component {
@action
loaded(person) {
set(this, 'person', person);
}
@action
failedToLoad(error) {
set(this, 'loadingError', error.message);
}
}
{{! my-modal/template.hbs }}
<ModalDialog
@onClose={{@onClose}}
@onLoad={{@onFetchPerson}}
@onLoaded={{this.loaded}}
@onLoadError={{this.failedToLoad}} as |modal|>
<modal.Header>
Welcome
</modal.Header>
<modal.Content>
{{#if modal.isLoading}}
Loading person…
{{else if this.loadingError}}
Unable to load person because {{this.loadingError}}
{{else}}
Hello {{this.person.name}}
{{/if}}
</modal.Content>
<modal.Footer>
<button {{on "click" modal.close}}>Close</button>
</modal.Footer>
</ModalDialog>
// application/route.js
export default class ApplicationRoute extends Route {
@action
loadPerson() {
// Fetch remote data
}
}
{{! application/route.hbs }}
{{#if this.showMyModal}}
<MyModal
@onClose={{this.hideMyModal}}
@onFetchPerson={{fn this.loadPerson 123}} />
{{/if}}
1.0.1
FAQs
A simple modal dialog component for Ember apps
The npm package @zestia/ember-modal-dialog receives a total of 1,901 weekly downloads. As such, @zestia/ember-modal-dialog popularity was classified as popular.
We found that @zestia/ember-modal-dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.