sdk-consent-privacytools
v1.0.19
Published
React.js Consent Management Utility for the PrivacyTools platform
Downloads
54
Readme
sdk-consent-privacytools
Consent Management Utility for the PrivacyTools platform
Install
npm install --save sdk-consent-privacytools
Usage
Using the Consent Pop Up
import React, { Component } from 'react'
import { ConsentPopUp } from 'sdk-consent-privacytools'
class Example extends Component {
render() {
return (
<ConsentPopUp
base={'<base_url>'}
hashTemplate={'<hash_template>'}
hashUser={'<user_hash>'}
closePopup={() => {}}
/>
);
}
}
Using the Consent Wrapper to create your own custom UI
import React, { Component } from 'react'
import { ConsentWrapper } from 'sdk-consent-privacytools'
class Example extends Component {
render() {
return (
<ConsentWrapper
base={'<base_url>'}
hashTemplate={'<hash_template>'}
>
{
(loading, error, data) => {
return (
<div>
{
//your custom component
}
</div>>
);
}
}
</ConsentWrapper>
);
}
}
License
PrivacyTools.com.br