@wee-busines/wee-cookie-settings
v2.0.6
Published
Cookie settings for all App's
Downloads
7
Keywords
Readme
wee-cookie-settings
Cookie Settings for all wee apps
Install
yarn install wee-cookie-settings --save yarn add wee-cookie-settings
Usage
import * as React from 'react'
import { CookieSettings, CookieType } from 'wee-cookie-settings';
class Example extends React.Component {
render () {
return (
<CookieSettings
types={[CookieType.necessary]}
imprintLink="http://www.google.de"
onSubmit={(types: CookieType[]) => {}}
onClickType={() => {}}
/>
)
}
}
Running in development mode
Run wee-cookie-settings
Go to project root directory and run
yarn start
Run Example project
In a new command line terminal go to example directory and run
yarn start
In your browser go to localhost:3000 and see the example project in action. You can make changes in the library and view changes in the browser in your example project.
Building and testing library using yarn link.
If you only want to test the wee-cookie-settings component in your project you can build the library by running
yarn build
And then link the library using
yarn link
In the project where you want to test the components run following command
yarn link "wee-cookie-settings"
Now run your project and you will be able to test the library without downloading it from npm repo. This method is particularly useful when you just want to test the components locally when they are not available in npm repo.