Doc update on PT and cosmetic on hero section

pull/5072/head
Cagatay Civici 2024-01-12 10:55:29 +03:00
parent e7532bc30a
commit 4c97a6df8c
2 changed files with 23 additions and 17 deletions

View File

@ -7,8 +7,8 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
style="border-radius: 50px" style="border-radius: 50px"
class="bg-yellow-300 border-1 border-yellow-400 text-yellow-900 py-1 px-3 xl:align-self-start font-semibold text-lg transition-colors transition-duration-300 hover:border-yellow-600" class="bg-yellow-300 border-1 border-yellow-400 text-yellow-900 py-1 px-3 xl:align-self-start font-semibold transition-colors transition-duration-300 hover:border-yellow-600 text-base sm:text-lg"
>🎉 Introducing the Tailwind CSS Presets <i class="pi pi-arrow-right text-sm"></i >🎉 Introducing the Tailwind Presets <i class="pi pi-arrow-right text-sm"></i
></a> ></a>
<h1 class="text-6xl font-bold text-center xl:text-left">The Next-Gen UI Suite for <span class="font-bold text-primary">Vue.js</span></h1> <h1 class="text-6xl font-bold text-center xl:text-left">The Next-Gen UI Suite for <span class="font-bold text-primary">Vue.js</span></h1>
<p class="section-detail xl:text-left text-center px-0 mt-0 mb-5"> <p class="section-detail xl:text-left text-center px-0 mt-0 mb-5">
@ -141,6 +141,12 @@
menuButton: { menuButton: {
width: 'auto', width: 'auto',
root: 'p-2' root: 'p-2'
},
menu: {
root: {
style: 'width: 10rem; min-width: auto',
},
action: 'p-2'
} }
}" }"
/> />

View File

@ -1,8 +1,7 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p> <p>
An existing pass through configuration is customized with the <i>usePassThrough</i> utility. The first parameter is the object to customize, the second parameter is the customizations and the final parameter is the behavior of merging. An existing pass through configuration is customized with the <i>usePassThrough</i> utility. The first parameter is the object to customize, the second parameter is the customizations and the final parameter is the merge strategy.
One of the example use cases is customizing existing unstyled themes like Tailwind.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
<p> <p>
@ -22,15 +21,15 @@ export default {
return { return {
code1: { code1: {
basic: ` basic: `
import {createApp} from "vue"; import { createApp } from "vue";
import PrimeVue from "primevue/config"; import PrimeVue from "primevue/config";
import { usePassThrough } from "primevue/passthrough"; import { usePassThrough } from "primevue/passthrough";
import Tailwind from "primevue/passthrough/tailwind"; import BasePreset from "./basepreset";
const app = createApp(App); const app = createApp(App);
const CustomTailwind = usePassThrough( const CustomPreset = usePassThrough(
Tailwind, BasePreset,
{ {
panel: { panel: {
title: { title: {
@ -44,13 +43,13 @@ const CustomTailwind = usePassThrough(
} }
); );
app.use(PrimeVue, { unstyled: true, pt: CustomTailwind }); app.use(PrimeVue, { unstyled: true, pt: CustomPreset });
` `
}, },
code2: { code2: {
basic: ` basic: `
const CustomTailwind = usePassThrough( const CustomPreset = usePassThrough(
Tailwind, BasePreset,
{ {
panel: { panel: {
header: 'my_panel_header' header: 'my_panel_header'
@ -66,8 +65,8 @@ const CustomTailwind = usePassThrough(
}, },
code3: { code3: {
basic: ` basic: `
const CustomTailwind = usePassThrough( const CustomPreset = usePassThrough(
Tailwind, BasePreset,
{ {
panel: { panel: {
header: 'my_panel_header' header: 'my_panel_header'
@ -83,8 +82,8 @@ const CustomTailwind = usePassThrough(
}, },
code4: { code4: {
basic: ` basic: `
const CustomTailwind = usePassThrough( const CustomPreset = usePassThrough(
Tailwind, BasePreset,
{ {
panel: { panel: {
header: 'my_panel_header' header: 'my_panel_header'
@ -99,8 +98,9 @@ const CustomTailwind = usePassThrough(
` `
}, },
code5: { code5: {
basic: `const CustomTailwind = usePassThrough( basic: `
Tailwind, const CustomPreset = usePassThrough(
BasePreset,
{ {
panel: { panel: {
header: 'my_panel_header' header: 'my_panel_header'