Update messages

pull/358/head
cagataycivici 2020-07-02 10:22:03 +03:00
parent 7347e3a16d
commit 792ed203db
8 changed files with 62 additions and 63 deletions

View File

@ -3936,8 +3936,8 @@
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
} }
.p-toast .p-toast-item-container .p-toast-icon-close { .p-toast .p-toast-item-container .p-toast-icon-close {
width: 2.5rem; width: 2rem;
height: 2.5rem; height: 2rem;
border-radius: 50%; border-radius: 50%;
background: transparent; background: transparent;
transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;

View File

@ -3936,8 +3936,8 @@
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
} }
.p-toast .p-toast-item-container .p-toast-icon-close { .p-toast .p-toast-item-container .p-toast-icon-close {
width: 2.5rem; width: 2rem;
height: 2.5rem; height: 2rem;
border-radius: 50%; border-radius: 50%;
background: transparent; background: transparent;
transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;

View File

@ -3936,8 +3936,8 @@
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
} }
.p-toast .p-toast-item-container .p-toast-icon-close { .p-toast .p-toast-item-container .p-toast-icon-close {
width: 2.5rem; width: 2rem;
height: 2.5rem; height: 2rem;
border-radius: 50%; border-radius: 50%;
background: transparent; background: transparent;
transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;

View File

@ -3936,8 +3936,8 @@
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
} }
.p-toast .p-toast-item-container .p-toast-icon-close { .p-toast .p-toast-item-container .p-toast-icon-close {
width: 2.5rem; width: 2rem;
height: 2.5rem; height: 2rem;
border-radius: 50%; border-radius: 50%;
background: transparent; background: transparent;
transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;

View File

@ -10,10 +10,10 @@
<div class="content-section implementation"> <div class="content-section implementation">
<div class="card"> <div class="card">
<h5>Severities</h5> <h5>Severities</h5>
<Message severity="success">Order Submitted</Message> <Message severity="success">Success Message Content</Message>
<Message severity="info">PrimeVue Rocks</Message> <Message severity="info">Info Message Content</Message>
<Message severity="warn">There are unsaved changes</Message> <Message severity="warn">Warning Message Content</Message>
<Message severity="error">Validation Failed</Message> <Message severity="error">Error Message Content</Message>
<h5>Dynamic</h5> <h5>Dynamic</h5>
<Button label="Show" @click="addMessages()" /> <Button label="Show" @click="addMessages()" />

View File

@ -231,24 +231,23 @@ import InlineMessage from 'primevue/inlinemessage';
</a> </a>
<CodeHighlight> <CodeHighlight>
<template v-pre> <template v-pre>
&lt;h3&gt;Severities&lt;/h3&gt; &lt;h5&gt;Severities&lt;/h5&gt;
&lt;Message severity="success"&gt;Order Submitted&lt;/Message&gt; &lt;Message severity="success"&gt;Success Message Content&lt;/Message&gt;
&lt;Message severity="info"&gt;PrimeVue Rocks&lt;/Message&gt; &lt;Message severity="info"&gt;Info Message Content&lt;/Message&gt;
&lt;Message severity="warn"&gt;There are unsaved changes&lt;/Message&gt; &lt;Message severity="warn"&gt;Warning Message Content&lt;/Message&gt;
&lt;Message severity="error"&gt;Validation Failed&lt;/Message&gt; &lt;Message severity="error"&gt;Error Message Content&lt;/Message&gt;
&lt;h3&gt;Dynamic&lt;/h3&gt; &lt;h5&gt;Dynamic&lt;/h5&gt;
&lt;Button label="Show" @click="addMessages()" /&gt; &lt;Button label="Show" @click="addMessages()" /&gt;
&lt;Button label="Clear" @click="removeMessages()" class="p-button-secondary"/&gt; &lt;Button label="Clear" @click="removeMessages()" class="p-button-secondary"/&gt;
&lt;transition-group name="p-messages" tag="div"&gt; &lt;transition-group name="p-messages" tag="div"&gt;
&lt;Message v-for="msg of messages" :severity="msg.severity" :key="msg.content"&gt;{{msg.content}}&lt;/Message&gt; &lt;Message v-for="msg of messages" :severity="msg.severity" :key="msg.content"&gt;{{msg.content}}&lt;/Message&gt;
&lt;/transition-group&gt; &lt;/transition-group&gt;
&lt;h3&gt;Auto Dismiss&lt;/h3&gt; &lt;h5&gt;Auto Dismiss&lt;/h5&gt;
&lt;Message severity="warn" :life="10000" :sticky="false"&gt;This message will hide in 10 seconds.&lt;/Message&gt; &lt;Message severity="warn" :life="10000" :sticky="false"&gt;This message will hide in 10 seconds.&lt;/Message&gt;
&lt;h3&gt;Validation Message&lt;/h3&gt; &lt;h5&gt;Validation Message&lt;/h5&gt;
&lt;div class="p-formgroup-inline" style="margin-bottom:.5rem"&gt; &lt;div class="p-formgroup-inline" style="margin-bottom:.5rem"&gt;
&lt;Label for="username" class="p-sr-only"&gt;Username&lt;/Label&gt; &lt;Label for="username" class="p-sr-only"&gt;Username&lt;/Label&gt;
&lt;InputText id="username" placeholder="Username" class="p-invalid" /&gt; &lt;InputText id="username" placeholder="Username" class="p-invalid" /&gt;

View File

@ -44,33 +44,33 @@ export default {
}, },
methods: { methods: {
showSuccess() { showSuccess() {
this.$toast.add({severity:'success', summary: 'Success Message', detail:'Order submitted', life: 3000}); this.$toast.add({severity:'success', summary: 'Success Message', detail:'Message Content', life: 3000});
}, },
showInfo() { showInfo() {
this.$toast.add({severity:'info', summary: 'Info Message', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary: 'Info Message', detail:'Message Content', life: 3000});
}, },
showWarn() { showWarn() {
this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'There are unsaved changes', life: 3000}); this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'Message Content', life: 3000});
}, },
showError() { showError() {
this.$toast.add({severity:'error', summary: 'Error Message', detail:'Validation failed', life: 3000}); this.$toast.add({severity:'error', summary: 'Error Message', detail:'Message Content', life: 3000});
}, },
showTopLeft() { showTopLeft() {
this.$toast.add({severity: 'info', summary: 'Info ', detail: 'You need to close Me', group: 'tl', life: 3000}); this.$toast.add({severity: 'info', summary: 'Info Message', detail: 'Message Content', group: 'tl', life: 3000});
}, },
showBottomLeft() { showBottomLeft() {
this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'There are unsaved changes', group: 'bl', life: 3000}); this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'Message Content', group: 'bl', life: 3000});
}, },
showBottomRight() { showBottomRight() {
this.$toast.add({severity:'success', summary: 'Success Message', detail:'Order submitted', group: 'br', life: 3000}); this.$toast.add({severity:'success', summary: 'Success Message', detail:'Message Content', group: 'br', life: 3000});
}, },
showSticky() { showSticky() {
this.$toast.add({severity: 'info', summary: 'Sticky Message', detail: 'You need to close Me'}); this.$toast.add({severity: 'info', summary: 'Sticky Message', detail: 'Message Content'});
}, },
showMultiple() { showMultiple() {
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 1', detail:'Message 1 Content', life: 3000});
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 2', detail:'Message 2 Content', life: 3000});
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 3', detail:'Message 3 Content', life: 3000});
}, },
clear() { clear() {
this.$toast.removeAllGroups(); this.$toast.removeAllGroups();

View File

@ -277,37 +277,37 @@ export default {
}, },
methods: { methods: {
showSuccess() { showSuccess() {
this.$toast.add({severity:'success', summary: 'Success Message', detail:'Order submitted', life: 3000}); this.$toast.add({severity:'success', summary: 'Success Message', detail:'Message Content', life: 3000});
}, },
showInfo() { showInfo() {
this.$toast.add({severity:'info', summary: 'Info Message', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary: 'Info Message', detail:'Message Content', life: 3000});
}, },
showWarn() { showWarn() {
this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'There are unsaved changes', life: 3000}); this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'Message Content', life: 3000});
}, },
showError() { showError() {
this.$toast.add({severity:'error', summary: 'Error Message', detail:'Validation failed', life: 3000}); this.$toast.add({severity:'error', summary: 'Error Message', detail:'Message Content', life: 3000});
}, },
showTopLeft() { showTopLeft() {
this.$toast.add({severity: 'info', summary: 'Info ', detail: 'You need to close Me', group: 'tl', life: 3000}); this.$toast.add({severity: 'info', summary: 'Info Message', detail: 'Message Content', group: 'tl', life: 3000});
}, },
showBottomLeft() { showBottomLeft() {
this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'There are unsaved changes', group: 'bl', life: 3000}); this.$toast.add({severity:'warn', summary: 'Warn Message', detail:'Message Content', group: 'bl', life: 3000});
}, },
showBottomRight() { showBottomRight() {
this.$toast.add({severity:'success', summary: 'Success Message', detail:'Order submitted', group: 'br', life: 3000}); this.$toast.add({severity:'success', summary: 'Success Message', detail:'Message Content', group: 'br', life: 3000});
}, },
showSticky() { showSticky() {
this.$toast.add({severity: 'info', summary: 'Sticky Message', detail: 'You need to close Me'}); this.$toast.add({severity: 'info', summary: 'Sticky Message', detail: 'Message Content'});
}, },
showMultiple() { showMultiple() {
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 1', detail:'Message 1 Content', life: 3000});
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 2', detail:'Message 2 Content', life: 3000});
this.$toast.add({severity:'info', summary:'Message 1', detail:'PrimeVue rocks', life: 3000}); this.$toast.add({severity:'info', summary:'Message 3', detail:'Message 3 Content', life: 3000});
}, },
clear() { clear() {
this.$toast.removeAllGroups(); this.$toast.removeAllGroups();
} }
} }
} }
</CodeHighlight> </CodeHighlight>