react-lgpd-consent - v0.3.4
    Preparing search index...

    Interface ConsentContextValue

    Valor do contexto de consentimento, incluindo estado e métodos de manipulação.

    Types

    0.1.0

    interface ConsentContextValue {
        acceptAll: () => void;
        closePreferences: () => void;
        consented: boolean;
        isModalOpen?: boolean;
        openPreferences: () => void;
        preferences: ConsentPreferences;
        rejectAll: () => void;
        resetConsent: () => void;
        setPreference: (cat: Category, value: boolean) => void;
        setPreferences: (preferences: ConsentPreferences) => void;
    }
    Index

    Properties

    acceptAll: () => void

    Aceita todas as categorias de consentimento.

    closePreferences: () => void

    Fecha o modal de preferências.

    consented: boolean

    Indica se o usuário consentiu.

    isModalOpen?: boolean

    Indica se o modal de preferências está aberto.

    openPreferences: () => void

    Abre o modal de preferências.

    preferences: ConsentPreferences

    Preferências atuais do usuário.

    rejectAll: () => void

    Rejeita todas as categorias de consentimento.

    resetConsent: () => void

    Reseta o consentimento do usuário.

    setPreference: (cat: Category, value: boolean) => void

    Define a preferência para uma categoria específica.

    setPreferences: (preferences: ConsentPreferences) => void

    Define múltiplas preferências de uma vez e salva.