Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-animated-status-label

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-animated-status-label

Simple component to animate a label based on Promise state

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Ember Animated Status Label

Build Status Ember Observer Score Dependency Status Code Climate

The ember-animated-status-label addon provides a component that will show different labels that correspond to the pending, recently-settled, and settled promise states. This component also provides a subtle animated transition between each state.

The component transitions between three states to reflect the state of the promise: Pending, Confirming, and Settled. When provided with a new promise, the component will transition to the Pending state. If the promise resolves, it will transition to the Confirming state for a short time to show some confirmation content. After showing the confirmation, or if the original promise rejects, the component will transition to the Settled state.

The component yields a hash that indicates the current state, through isPending, isConfirming, and isSettled properties. The host app must supply the content that will be shown in each of those states.

Demo

alt text

Including in an application

Here is the simplest way to get started with ember-animated-status-label:

ember install ember-animated-status-label

application.hbs

{{#animated-status-label promise=promise as |label|}}
  {{#if label.isPending}}
    <span>This text displays before the promise has resolved.</span>
  {{else if label.isConfirming}}
    <span>This text displays for a short time after the promise has resolved.</span>
  {{else if label.isSettled}}
    <span>This text displays when the promise has settled.</span>
  {{/if}}
{{/animated-status-label}}

Configurable Properties

animated-status-label

The animated-status-label component supports the following properties:

PropertyPurpose
promiseA Promises/A+ compliant implementation.
confirmationDurationThe amount of time we should show the confirmation content after the promise resolves, in milliseconds. Defaults to 1500.
onConfirmationFinishedAn action to be called after the confirmation animation has completed.

Linting

  • yarn lint:js
  • yarn lint:js --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 20 Dec 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc