Skip to content

Commit

Permalink
Toast message templating added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 19, 2021
1 parent bad5179 commit 0bd138b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
10 changes: 9 additions & 1 deletion api-generator/components/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ const ToastProps = [
}
];

const ToastSlots = [
{
name: "message",
description: "Custom content for the component."
}
];

module.exports = {
toast: {
name: "Toast",
description: "Toast is used to display messages in an overlay.",
props: ToastProps
props: ToastProps,
slots: ToastSlots
}
};
5 changes: 4 additions & 1 deletion src/components/toast/Toast.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import Vue from 'vue';
import Vue, { VNode } from 'vue';

declare class Toast extends Vue {
group?: string;
position?: string;
autoZIndex?: boolean;
baseZIndex?: number;
breakpoints?: {[key: string]: string};
$slots: {
message: VNode[];
}
}

export default Toast;
18 changes: 18 additions & 0 deletions src/views/toast/ToastDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,24 @@ this.$toast.removeAllGroups();
</table>
</div>

<h5>Slots</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td>message</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>

<h5>Styling</h5>
<p>Following is the list of structural style classes, for theming classes visit <router-link to="/theming">theming</router-link> page.</p>
<div class="doc-tablewrapper">
Expand Down

0 comments on commit 0bd138b

Please sign in to comment.