Skip to content

Commit

Permalink
docs(@dpc-sdp/ripple-ui-core): tweaked alert story display
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdowdle committed Jun 26, 2023
1 parent 5bc3cbd commit 3d5e3e2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,22 @@ export const SingleTemplate = (args) => ({
components: { RplAlert },
setup() {
const dismissed = reactive({
error: false,
information: false,
warning: false,
information: false
error: false
})
return {
args,
dismissed,
onDismiss: ({ id }) => dismissed[id] = !dismissed[id],
icons: ['icon-information-circle-filled', 'icon-fire', 'icon-exclamation-circle-filled'],
messages: ['An informative message.', 'A warning message.', 'A critical message.']
}
},
template: `<div style="position: relative;" v-for="(alert, i) in Object.keys(dismissed)">
<RplAlert v-bind="args"
:message="messages[i]"
:iconName="icons[i]"
:key="'alert-' + i"
:variant="alert"
:alertId="alert"
Expand Down

0 comments on commit 3d5e3e2

Please sign in to comment.