Ripple pt demo added

pull/4243/head
Tuğçe Küçükoğlu 2023-08-07 16:34:41 +03:00
parent e65247f541
commit 13d797bb4f
5 changed files with 136 additions and 2 deletions

View File

@ -3,7 +3,16 @@
<p>Ripple is enabled by adding add <i>p-ripple</i> class to the target and attach the directive with the v- prefix.</p> <p>Ripple is enabled by adding add <i>p-ripple</i> class to the target and attach the directive with the v- prefix.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-content-center align-items-center"> <div class="card flex justify-content-center align-items-center">
<div v-ripple class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold">Default</div> <div
v-ripple="{
pt: {
root: 'bg-yellow-400'
}
}"
class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold"
>
Default
</div>
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>

74
doc/ripple/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,74 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center align-items-center">
<div
v-ripple="{
pt: {
root: 'bg-yellow-400'
}
}"
class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold"
>
Default
</div>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<div
v-ripple="{
pt: {
root: 'bg-yellow-400'
}
}"
class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold"
>
Default
</div>`,
options: `
<template>
<div class="card card-container flex justify-content-center align-items-center">
<div
v-ripple="{
pt: {
root: 'bg-yellow-400'
}
}"
class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold"
>
Default
</div>
</div>
</template>
<script>
<\/script>`,
composition: `
<template>
<div class="card card-container flex justify-content-center align-items-center">
<div
v-ripple="{
pt: {
root: 'bg-yellow-400'
}
}"
class="p-ripple bg-primary flex select-none justify-content-center align-items-center shadow-2 border-round p-6 font-bold"
>
Default
</div>
</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/ripple/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Ripple 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.steps',
label: 'Ripple PT Options',
component: DocApiTable,
data: getPTOption('Ripple')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Ripple Component" header="Ripple" description="Ripple directive adds ripple effect to the host element." :componentDocs="docs" :apiDocs="['Ripple']" :themingDocs="themingDoc" /> <DocComponent title="Vue Ripple Component" header="Ripple" description="Ripple directive adds ripple effect to the host element." :componentDocs="docs" :apiDocs="['Ripple']" :ptTabComponent="ptComponent" :themingDocs="themingDoc" />
</template> </template>
<script> <script>
@ -8,6 +8,7 @@ import ConfigurationDoc from '@/doc/ripple/ConfigurationDoc.vue';
import CustomDoc from '@/doc/ripple/CustomDoc'; import CustomDoc from '@/doc/ripple/CustomDoc';
import DefaultDoc from '@/doc/ripple/DefaultDoc'; import DefaultDoc from '@/doc/ripple/DefaultDoc';
import ImportDoc from '@/doc/ripple/ImportDoc'; import ImportDoc from '@/doc/ripple/ImportDoc';
import PTComponent from '@/doc/ripple/pt/index.vue';
import ThemingDoc from '@/doc/ripple/theming/index.vue'; import ThemingDoc from '@/doc/ripple/theming/index.vue';
export default { export default {
@ -40,6 +41,7 @@ export default {
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent,
themingDoc: ThemingDoc themingDoc: ThemingDoc
}; };
} }