An open API service indexing awesome lists of open source software.

https://github.com/origenstudio/material-ui-cookie-consent

Allow cookies in your site with style! Material style! :sunglasses:
https://github.com/origenstudio/material-ui-cookie-consent

cookies javascript material-design material-ui react

Last synced: about 2 months ago
JSON representation

Allow cookies in your site with style! Material style! :sunglasses:

Awesome Lists containing this project

README

        

# Material-UI Cookie Consent

Material-UI component that show a cookie consent message.

## Example

Check this [example site](https://material-ui-cookie-consent.origen.studio)

## Dependencies

This package has the following peer dependencies that need to be installed manually:

```json
{
"@material-ui/core": "^4.0.1",
"react": "^16.8.6",
"react-dom": "^16.8.6"
}
```

## Installation

```sh
yarn add material-ui-cookie-consent
```

or

```sh
npm install material-ui-cookie-consent
```

## Usage - Simple example

```js
import MUICookieConsent from 'material-ui-cookie-consent';

// ....

//....
```

## API

#### Table of Contents

- [MUICookieConsent](#muicookieconsent)
- [Parameters](#parameters)
- [handleScroll](#handlescroll)
- [handleAccept](#handleaccept)

### MUICookieConsent

**Extends React.Component**

This component is the MUICookieConsent it pops a Snackbar or a Dialog informing the user about cookie consent.

#### Parameters

- `props` **Props**

#### handleScroll

checks whether scroll has exceeded set amount and fire accept if so.

#### handleAccept

Set a persistent cookie