Doc update on PT and cosmetic on hero section

This commit is contained in:
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

@ -1,8 +1,7 @@
<template>
<DocSectionText v-bind="$attrs">
<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.
One of the example use cases is customizing existing unstyled themes like Tailwind.
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.
</p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
<p>
@ -22,15 +21,15 @@ export default {
return {
code1: {
basic: `
import {createApp} from "vue";
import { createApp } from "vue";
import PrimeVue from "primevue/config";
import { usePassThrough } from "primevue/passthrough";
import Tailwind from "primevue/passthrough/tailwind";
import BasePreset from "./basepreset";
const app = createApp(App);
const CustomTailwind = usePassThrough(
Tailwind,
const CustomPreset = usePassThrough(
BasePreset,
{
panel: {
title: {
@ -44,13 +43,13 @@ const CustomTailwind = usePassThrough(
}
);
app.use(PrimeVue, { unstyled: true, pt: CustomTailwind });
app.use(PrimeVue, { unstyled: true, pt: CustomPreset });
`
},
code2: {
basic: `
const CustomTailwind = usePassThrough(
Tailwind,
const CustomPreset = usePassThrough(
BasePreset,
{
panel: {
header: 'my_panel_header'
@ -66,8 +65,8 @@ const CustomTailwind = usePassThrough(
},
code3: {
basic: `
const CustomTailwind = usePassThrough(
Tailwind,
const CustomPreset = usePassThrough(
BasePreset,
{
panel: {
header: 'my_panel_header'
@ -83,8 +82,8 @@ const CustomTailwind = usePassThrough(
},
code4: {
basic: `
const CustomTailwind = usePassThrough(
Tailwind,
const CustomPreset = usePassThrough(
BasePreset,
{
panel: {
header: 'my_panel_header'
@ -99,8 +98,9 @@ const CustomTailwind = usePassThrough(
`
},
code5: {
basic: `const CustomTailwind = usePassThrough(
Tailwind,
basic: `
const CustomPreset = usePassThrough(
BasePreset,
{
panel: {
header: 'my_panel_header'