Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usePassThrough method to customize default PT objects #4257

Closed
mertsincan opened this issue Aug 10, 2023 · 0 comments
Closed

Add usePassThrough method to customize default PT objects #4257

mertsincan opened this issue Aug 10, 2023 · 0 comments
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@mertsincan
Copy link
Member

mertsincan commented Aug 10, 2023

It is used to customize the default PT objects. It generates a new object instead of changing the default one.

Exp;

import { usePassThrough } from 'primevue/passthrough';
import Tailwind from 'primevue/passthrough/tailwind';

const CustomTailwind = usePassThrough(
    Tailwind,
    {
        panel: {
            title: {
                class: ['leading-none font-light text-2xl']
            }
        }
    },
    {
        merge: true,             // Used to merge PT options. The default is true.
        useMergeProps: false,    // Whether to use Vue's `mergeProps` method to merge PT options.
        ignoredKeysOnMerge: [],  // Defines keys to ignore during the merge operation. For example; ['panel.title']
        customizer: undefined    // Defines the custom method to merge PT options.
    }
);
@mertsincan mertsincan added the Type: New Feature Issue contains a new feature or new component request label Aug 10, 2023
@mertsincan mertsincan added this to the 3.32.0 milestone Aug 10, 2023
@mertsincan mertsincan self-assigned this Aug 10, 2023
mertsincan added a commit that referenced this issue Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

1 participant