Socket
Socket
Sign inDemoInstall

waulter-test2

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    waulter-test2

A JavaScript library for handling cookie consent dialogs in web applications.


Version published
Weekly downloads
1
Maintainers
1
Install size
5.25 MB
Created
Weekly downloads
 

Readme

Source

waulter-test1

A JavaScript library for handling cookie consent dialogs in web applications.

Installation

You can install waulter-test1 using npm or yarn:

npm install waulter-test1 --save

Usage

To use the CookieConsentDialog component, follow these steps:

  1. Import the CookieConsentDialog component into your application:
import {CookieConsentDialog} from 'waulter-test1';
  1. Create a callback function to handle user choices. This function will be called when the user interacts with the dialog:
const handleChoice = (choice) => {
    // Handle the user's choice here (e.g., store it in a cookie)
};
  1. Use the CookieConsentDialog component in your application:
import React, { useState } from 'react';
import CookieConsentDialog from 'waulter-test1';

function App() {
    const [consentGiven, setConsentGiven] = useState(false);

    const handleChoice = (choice) => {
        // Handle user's choice here (e.g., store it in a cookie)
    };

    return (
        <div>
            <CookieConsentDialog onChoice={handleChoice} />
            {/* Your app content */}
        </div>
    );
}

export default App;

  1. Customize the appearance and behavior of the dialog by passing props to the CookieConsentDialog component.

Props

onChoice : A callback function that is called when the user makes a choice in the dialog. It receives the selected option as an argument.

FAQs

Last updated on 05 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc