Skip to content

Commit 6b364f2

Browse files
committed
✨ add button to MucCallout
1 parent b9ad50e commit 6b364f2

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/components/Callout/MucCallout.stories.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { MucButton } from "../Button";
12
import MucCallout from "./MucCallout.vue";
23

34
export default {
@@ -47,3 +48,23 @@ export const Error = {
4748
type: "error",
4849
},
4950
};
51+
52+
export const WithButton = () => ({
53+
components: { MucCallout, MucButton },
54+
template: `
55+
<MucCallout
56+
type="info"
57+
>
58+
<template #header>
59+
Button
60+
</template>
61+
<template #content>
62+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
63+
dolore magna aliquyam erat, sed diam voluptua.
64+
</template>
65+
<template #button>
66+
<muc-button icon="arrow-right" icon-animated> Button</muc-button>
67+
</template>
68+
</MucCallout>
69+
`,
70+
});

src/components/Callout/MucCallout.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
class="m-callout__content"
2424
/>
2525
</p>
26+
<slot name="button" />
2627
</div>
2728
</div>
2829
</div>
@@ -59,6 +60,10 @@ defineSlots<{
5960
* Content beneath the heading shown as text.
6061
*/
6162
content(): unknown;
63+
/**
64+
* Button beneath the content.
65+
*/
66+
button(): unknown;
6267
}>();
6368
6469
/*

0 commit comments

Comments
 (0)