2022-03-14 16:54:49 +00:00
|
|
|
<!-- START component-docs:@tagName -->
|
|
|
|
# Consul::LockSession::Notifications
|
|
|
|
<!-- END component-docs:@tagName -->
|
|
|
|
|
|
|
|
<!-- START component-docs:@description-->
|
|
|
|
A Notification component specifically for LockSessions.
|
|
|
|
<!-- END component-docs:@description -->
|
|
|
|
|
|
|
|
|
|
|
|
```hbs preview-template
|
|
|
|
<figure>
|
|
|
|
|
|
|
|
<figcaption>
|
|
|
|
Provide a widget for to change the @type
|
|
|
|
</figcaption>
|
|
|
|
|
|
|
|
<select
|
|
|
|
onchange={{action (mut this.type) value="target.value"}}
|
|
|
|
>
|
|
|
|
<option>kv</option>
|
|
|
|
<option>success</option>
|
|
|
|
<option>error</option>
|
|
|
|
</select>
|
|
|
|
</figure>
|
|
|
|
|
|
|
|
<figure>
|
|
|
|
|
|
|
|
<figcaption>
|
|
|
|
Use the component
|
|
|
|
</figcaption>
|
|
|
|
|
|
|
|
<Consul::LockSession::Notifications
|
2022-06-08 15:07:51 +00:00
|
|
|
@type={{if (includes this.type (array 'success' 'error')) 'remove' 'kv'}}
|
2022-03-14 16:54:49 +00:00
|
|
|
@error={{if (eq this.type 'error') (hash
|
|
|
|
status="403"
|
|
|
|
detail=""
|
|
|
|
) undefined }}
|
|
|
|
/>
|
|
|
|
|
|
|
|
</figure>
|
|
|
|
```
|
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
<!-- START component-docs:@args -->
|
|
|
|
| Argument | Type | Default | Description |
|
|
|
|
| :-------- | :--------------- | :------ | :------------------------------------------------- |
|
|
|
|
| type | "remove" \| "kv" | | The type of Notification to use |
|
|
|
|
| error | error | | Consul UI shaped error only used for `remove` type |
|
|
|
|
|
|
|
|
<!-- END component-docs:@args -->
|
|
|
|
|