open-vault/ui/stories/alert-popup.md

29 lines
1.1 KiB
Markdown
Raw Normal View History

Add storybook (#6496) * add storybook * add storybook files * add ToggleButton and AlertBanner stories * add knobs addon * add notes addon * add ToggleButton and AlertsBanner notes * move panel to right * add ICon * create story blueprint * add header to blueprint * upgrade to storybook 5.0.1 * add confirm-action stories * move addon panel to bottom * update ConfirmAction * add jsdoc comments to alert banner component * add AlertInline * set showPanel to true in blueprint * include newly generated markdown for stories * adjust code example for toggle button * add json-to-markdown to package.json * update AuthForm * add Storybook readme * add AlertPopup * add story markdown custom template * make storybook dependencies optional * center all stories * use message-types helper to dynamically render alerts * hide panel * nest alert stories * move icons into table * separate homelink into multiple stories * add homelink with nav example * remove see links from alert-banner * add script to autogenerate markdown from component and add it to stories * add viewport addon and remove centered addon * update README to include markdown generation * remove @see links from jsdoc comments * update README to include jsdoc example * update alert banner md * get rid of trailing ###### * update jsdoc and regenerate notes files * update i-con md * Update ui/scripts/gen-story-md.js Co-Authored-By: noelledaley <noelledaley@users.noreply.github.com> * Update ui/scripts/gen-story-md.js Co-Authored-By: noelledaley <noelledaley@users.noreply.github.com> * add storybook docs to vault ui readme * add jsdoc comments to component blueprint, automatically import md file in story blueprint * add template template to component blueprint override * apply basic theme to storybook * remove comment * make sure all stories are using auto generated md * storybook: show optional props in brackets * storybook: 🔪 HomeLink * storybook: show AuthConfigForm stories with knobs
2019-04-03 21:06:20 +00:00
<!--THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/alert-popup.js. To make changes, first edit that file and run "yarn gen-story-md alert-popup" to re-generate the content.-->
## AlertPopup
The `AlertPopup` is an implementation of the [ember-cli-flash](https://github.com/poteto/ember-cli-flash) `flashMessage`.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| type | <code>String</code> | <code></code> | The alert type. This comes from the message-types helper. |
| [message] | <code>String</code> | <code></code> | The alert message. |
| close | <code>Func</code> | <code></code> | The close action which will close the alert. |
**Example**
```js
// All properties are passed in from the flashMessage service.
<AlertPopup
@type={{message-types flash.type}}
@message={{flash.message}}
@close={{close}}/>
```
**See**
- [Uses of AlertPopup](https://github.com/hashicorp/vault/search?l=Handlebars&q=AlertPopup)
- [AlertPopup Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/alert-popup.js)
---