primevue-mirror/doc/inlinemessage/TemplateDoc.vue

72 lines
2.3 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Custom content inside a message is defined with the <i>default</i> slot.</p>
</DocSectionText>
<div class="card">
<InlineMessage
:style="{
border: 'solid #696cff',
borderWidth: '0 0 0 6px',
color: '#696cff'
}"
severity="info"
class="border-primary w-full justify-content-start"
>
<div class="flex align-items-center">
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/logo.svg" width="32" />
<div class="ml-2">Always bet on Prime.</div>
</div>
</InlineMessage>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<InlineMessage :style="{ border: 'solid #696cff', borderWidth: '0 0 0 6px', color: '#696cff' }"
2023-03-20 08:09:34 +00:00
severity="info" class="border-primary w-full justify-content-start">
2023-02-28 08:29:30 +00:00
<div class="flex align-items-center">
2023-03-20 08:09:34 +00:00
<img alt="logo" src="/images/logo.svg" width="32" />
2023-02-28 08:29:30 +00:00
<div class="ml-2">Always bet on Prime.</div>
</div>
</InlineMessage>`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
2023-03-20 08:09:34 +00:00
<InlineMessage :style="{ border: 'solid #696cff', borderWidth: '0 0 0 6px', color: '#696cff' }"
severity="info" class="border-primary w-full justify-content-start">
2023-02-28 08:29:30 +00:00
<div class="flex align-items-center">
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/logo.svg" width="32" />
<div class="ml-2">Always bet on Prime.</div>
</div>
</InlineMessage>
</div>
</template>
<script>
<\/script>`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
2023-03-20 08:09:34 +00:00
<InlineMessage :style="{ border: 'solid #696cff', borderWidth: '0 0 0 6px', color: '#696cff' }"
severity="info" class="border-primary w-full justify-content-start">
2023-02-28 08:29:30 +00:00
<div class="flex align-items-center">
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/logo.svg" width="32" />
<div class="ml-2">Always bet on Prime.</div>
</div>
</InlineMessage>
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>