https://github.com/criptalia/react-iubenda-policy
React Component for Iubenda.com Privacy, Cookie and Terms Policy
https://github.com/criptalia/react-iubenda-policy
Last synced: 5 months ago
JSON representation
React Component for Iubenda.com Privacy, Cookie and Terms Policy
- Host: GitHub
- URL: https://github.com/criptalia/react-iubenda-policy
- Owner: criptalia
- Created: 2020-03-20T01:19:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T07:08:48.000Z (about 2 years ago)
- Last Synced: 2024-11-03T12:35:39.839Z (5 months ago)
- Language: JavaScript
- Size: 656 KB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - criptalia/react-iubenda-policy - React Component for Iubenda.com Privacy, Cookie and Terms Policy (JavaScript)
README
# React Component for Iubenda.com Cookie and Privacy Policy
[](https://www.npmjs.com/package/react-iubenda-policy)
[](https://www.npmjs.com/package/react-iubenda-policy)This component will let you easily use the embedded Iubenda generated policies in your React project.
## Install
```bash
npm i -S react-iubenda-policy
```## Usage
1. Import the Iubenda component
2. Find your policy id in your Iubenda dashboard. The policy id is the number at the end of the policy direct link.
- For example: https://www.iubenda.com/privacy-policy/123456
- Your policy id will be **123456**
3. Put the component in your page.### Properties
- `id`: the policy id.
- `type`: one of the following options:
- `privacy` to show the *Privacy Policy* button (default)
- `cookie` to show the *Cookie Policy* button
- `terms-and-conditions` to show the *Terms and conditions* button
- `style`: one of the following options:
- `nostyle`: renders the link as text. You can style the link in the wrapping div or span. (default)
- `black`: renders a black button with white text.
- `white`: renders a white button with black text.Note that for the *Terms and Conditions* you should use the internationalized type, for example `termini-e-condizioni` for the Italian language or `condiciones-de-uso` for Spanish. Check the Integration section in your Iubenda dashboard.
### Example
```jsx
import React from 'react'
import Iubenda from 'react-iubenda-policy'const Policy = () => {
const myPolicy = 123 // your policy id
return (
{/* Renders the Privacy Policy link with the text 'Privacy Policy' */}
Terms and conditions
Privacy Policy
Cookie Policy
)
}
```## License
[MIT](http://vjpr.mit-license.org)
[npm-image]: https://img.shields.io/npm/v/react-iubenda-policy.svg
[npm-url]: https://npmjs.org/package/react-iubenda-policy