mirror of https://github.com/hashicorp/consul
5fb9df1640
* Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.mdx | ||
index.hbs | ||
index.js |
README.mdx
# State `<State @state={{matchableStateObject}} @matches="idle">Currently Idle</State>` `<State />` is a renderless component that eases rendering of different states from within templates. State objects could be manually made state objects and xstate state objects. It's very similar to a normal conditional in that if the state identifier matches the current state, the contents of the component will be shown. ### Arguments | Argument/Attribute | Type | Default | Description | | --- | --- | --- | --- | | `state` | `object` | | An object that implements a `match` method | | `matches` | `String\|Array` | | A state identifier (or array of state identifiers) to match on | ### Example ```hbs <State @state={{state}} @matches="idle"> Currently Idle </State> <State @state={{state}} @matches="loading"> Currently Loading </State> <State @state={{state}} @matches={{array 'loading' 'idle'}}> Idle and loading </State> ``` ### See - [Component Source Code](./index.js) - [Template Source Code](./index.hbs) ---