open-consul/ui/packages/consul-ui/app/components/notice
John Cowen 124fa8f168
ui: Notifications re-organization/re-style (#11577)
- Moves where they appear up to the <App /> component.
- Instead of a <Notification /> wrapping component to move whatever you use for a notification up to where they need to appear (via ember-cli-flash), we now use a {{notification}} modifier now we have modifiers.
- Global notifications/flashes are no longer special styles of their own. You just use the {{notification}} modifier to hoist whatever component/element you want up to the top of the page. This means we can re-use our existing <Notice /> component for all our global UI notifications (this is the user visible change here)
2021-11-24 18:14:07 +00:00
..
README.mdx ui: Rename icons for consistency and remove unused icons (#10311) 2021-06-22 18:56:17 +01:00
index.hbs ui: Serf Health Check warning notice (#10194) 2021-05-13 11:36:51 +01:00
index.scss ui: Fixup prettier for scss files and run (#10296) 2021-05-27 13:23:54 +01:00
layout.scss
skin.scss ui: Notifications re-organization/re-style (#11577) 2021-11-24 18:14:07 +00:00

README.mdx

# Notice

Presentational component for informational/warning/error banners/notices.


```hbs preview-template
<Notice
  @type={{this.type}}
as |notice|>
  <notice.Header>
    <h3>Header</h3>
  </notice.Header>
  <notice.Body>
    <p>
      Body
    </p>
  </notice.Body>
  <notice.Footer>
    <p>
      <a href="">Footer link</a>
    </p>
  </notice.Footer>
</Notice>

<figure>
  <figcaption>Provide a widget to change the <code>@type</code></figcaption>

  <select
    onchange={{action (mut this.type) value="target.value"}}
  >
    <option>info</option>
    <option>success</option>
    <option>warning</option>
    <option>error</option>
  </select>

</figure>
```

## Arguments

| Argument/Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `String` | `info` | Type of notice [info\|warning\|error] |

## See

- [Template Source Code](./index.hbs)

---