Message & InlineMessage pt demos added

pull/3913/head
Tuğçe Küçükoğlu 2023-04-28 15:06:39 +03:00
parent 72c57b1bf2
commit b3008ea5a4
8 changed files with 241 additions and 4 deletions

View File

@ -0,0 +1,66 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<InlineMessage
:pt="{
root: { class: 'bg-yellow-100' },
icon: { class: 'hidden' }
}"
>
Username is required
</InlineMessage>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<InlineMessage
:pt="{
root: { class: 'bg-yellow-100' },
icon: { class: 'hidden' }
}"
>
Username is required
</InlineMessage>`,
options: `
<template>
<div class="card flex justify-content-center">
<InlineMessage
:pt="{
root: { class: 'bg-indigo-100' },
icon: { class: 'hidden' }
}"
>
Username is required
</InlineMessage>
</div>
</template>
<script>
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<InlineMessage
:pt="{
root: { class: 'bg-indigo-100' },
icon: { class: 'hidden' }
}"
>
Username is required
</InlineMessage>
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>InlineMessage Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.inlinemessage',
label: 'InlineMessage PT Options',
component: DocApiTable,
data: getPTOption('InlineMessage')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

62
doc/message/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,62 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card">
<Message
:pt="{
root: { class: 'bg-yellow-100' }
}"
>
Message Content
</Message>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Message
:pt="{
root: { class: 'bg-yellow-100' }
}"
>
Message Content
</Message>`,
options: `
<template>
<div class="card">
<Message
:pt="{
root: { class: 'bg-yellow-100' }
}"
>
Message Content
</Message>
</div>
</template>
<script>
<\/script>`,
composition: `
<template>
<div class="card">
<Message
:pt="{
root: { class: 'bg-yellow-100' }
}"
>
Message Content
</Message>
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

41
doc/message/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Message Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.message',
label: 'Message PT Options',
component: DocApiTable,
data: getPTOption('Message')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,12 @@
<template> <template>
<DocComponent title="Vue InlineMessage Component" header="InlineMessage" description="Inline Message component displays information related to another element such as invalid input." :componentDocs="docs" :apiDocs="['InlineMessage']" /> <DocComponent
title="Vue InlineMessage Component"
header="InlineMessage"
description="Inline Message component displays information related to another element such as invalid input."
:componentDocs="docs"
:apiDocs="['InlineMessage']"
:ptTabComponent="ptComponent"
/>
</template> </template>
<script> <script>
@ -10,6 +17,7 @@ import ImportDoc from '@/doc/inlinemessage/ImportDoc.vue';
import SeverityDoc from '@/doc/inlinemessage/SeverityDoc.vue'; import SeverityDoc from '@/doc/inlinemessage/SeverityDoc.vue';
import StyleDoc from '@/doc/inlinemessage/StyleDoc.vue'; import StyleDoc from '@/doc/inlinemessage/StyleDoc.vue';
import TemplateDoc from '@/doc/inlinemessage/TemplateDoc.vue'; import TemplateDoc from '@/doc/inlinemessage/TemplateDoc.vue';
import PTComponent from '@/doc/inlinemessage/pt/index.vue';
export default { export default {
data() { data() {
@ -50,7 +58,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Message Component" header="Message" description="Message component is used to display inline messages." :componentDocs="docs" :apiDocs="['Message']" /> <DocComponent title="Vue Message Component" header="Message" description="Message component is used to display inline messages." :componentDocs="docs" :apiDocs="['Message']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
@ -13,6 +13,7 @@ import SeverityDoc from '@/doc/message/SeverityDoc.vue';
import StickyDoc from '@/doc/message/StickyDoc.vue'; import StickyDoc from '@/doc/message/StickyDoc.vue';
import StyleDoc from '@/doc/message/StyleDoc.vue'; import StyleDoc from '@/doc/message/StyleDoc.vue';
import TemplateDoc from '@/doc/message/TemplateDoc.vue'; import TemplateDoc from '@/doc/message/TemplateDoc.vue';
import PTComponent from '@/doc/message/pt/index.vue';
export default { export default {
data() { data() {
@ -68,7 +69,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };