react-cookie-disclaimer
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "react-cookie-disclaimer", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "The package will help you to display a notification about the use of cookies on the site", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -9,3 +9,3 @@ ![react-cookie-disclaimer](https://repository-images.githubusercontent.com/229484861/fbde4700-36cf-11ea-88fe-db2690c68f8e) | ||
<img src='https://travis-ci.org/awibox/react-cookie-disclaimer.svg?branch=master' alt='Build' /> | ||
</a> | ||
</a> | ||
<a href='https://coveralls.io/github/awibox/react-cookie-disclaimer?branch=master'> | ||
@@ -50,76 +50,15 @@ <img src='https://coveralls.io/repos/github/awibox/react-cookie-disclaimer/badge.svg?branch=master' alt='Coverage Status' /> | ||
## The settings of the component | ||
### background (string) | ||
Sets the color for the background in any format that supports css. | ||
```typescript jsx | ||
<CookieDisclaimer background='#0079c1' /> | ||
``` | ||
Default value: ``` #fff ``` | ||
|Parameter|Type|Description|Default| | ||
|--------------------|--------|-----------|-------| | ||
|**background**|string|Sets the color for the background in any format that supports css|``` #fff ```| | ||
|**bottomPosition**|boolean|By default, the notification is displayed at the top of the page and the value of this parameter is ```false```. If set to ```true```, the notification will be displayed at the bottom|``` false ```| | ||
|**color**|string|Sets the color of the text and the cross to close|``` #000 ```| | ||
|**cookiePolicyName**|string|Sets the name for the cookie policy link|``` Cookie Policy ```| | ||
|**cookiePolicyText**|string|Sets the text before the cookie policy link. It is recommended to set value because default text may change in future versions|``` By continuing to use the service, you agree to our use of cookies as described in the ```| | ||
|**cookiePolicyLink**|string|Link to your cookie policy. If the link value is not set, the link with the name (cookiePolicyName) and the text before the link (cookiePolicyText) will not be displayed|-| | ||
|**text**|string|This is the main text that will be displayed in the notification. It is recommended to set value because default text may change in future versions|``` This website uses cookies to improve service, for analytical and advertising purposes. ```| | ||
|**closeIconSize**|number|Sets the size of the icon to close the notification|``` 28 ```| | ||
|**closeIconPositionTop**|boolean|By default the icon for closing is displayed in the middle relative to the height of the notification and the value of this parameter is ```false```. If set to ```true```, the closing icon will be displayed on the top|``` false ```| | ||
|**padding**|number|Sets padding for cookie notification|``` 20 ```| | ||
### bottomPosition (boolean) | ||
By default, the notification is displayed at the top of the page and the value of this parameter is ```false```. | ||
If set to ```true```, the notification will be displayed at the bottom. | ||
```typescript jsx | ||
<CookieDisclaimer bottomPosition={true} /> | ||
``` | ||
Default value: ``` false ``` | ||
### color (string) | ||
Sets the color of the text and the cross to close. | ||
```typescript jsx | ||
<CookieDisclaimer bottomPosition='#fff' /> | ||
``` | ||
Default value: ``` #000 ``` | ||
### cookiePolicyName (string) | ||
Sets the name for the cookie policy link | ||
```typescript jsx | ||
<CookieDisclaimer cookiePolicyName='our Cookie Policy' /> | ||
``` | ||
Default value: ``` Cookie Policy ``` | ||
### cookiePolicyText (string) | ||
Sets the text before the cookie policy link. | ||
It is recommended to set value because default text may change in future versions. | ||
```typescript jsx | ||
<CookieDisclaimer cookiePolicyText='Please read' /> | ||
``` | ||
Default value: ``` By continuing to use the service, you agree to our use of cookies as described in the ``` | ||
### cookiePolicyLink (string) | ||
Link to your cookie policy. | ||
If the link value is not set, the link with the name (cookiePolicyName) and the text before the link (cookiePolicyText) will not be displayed. | ||
```typescript jsx | ||
<CookieDisclaimer cookiePolicyLink='/cookie-policy' /> | ||
``` | ||
### text (string) | ||
This is the main text that will be displayed in the notification. It is recommended to set value because default text may change in future versions. | ||
```typescript jsx | ||
<CookieDisclaimer text='This website uses cookies to improve service.' /> | ||
``` | ||
Default value: ``` This website uses cookies to improve service, for analytical and advertising purposes. ``` | ||
### closeIconSize (number) | ||
Sets the size of the icon to close the notification | ||
```typescript jsx | ||
<CookieDisclaimer closeIconSize={20} /> | ||
``` | ||
Default value: ``` 28 ``` | ||
### closeIconPositionTop (boolean) | ||
By default the icon for closing is displayed in the middle relative to the height of the notification and the value of this parameter is ```false```. | ||
If set to ```true```, the closing icon will be displayed on the top. | ||
```typescript jsx | ||
<CookieDisclaimer closeIconPositionTop={true} /> | ||
``` | ||
Default value: ``` false ``` | ||
### padding (number) | ||
Sets padding for cookie notification | ||
```typescript jsx | ||
<CookieDisclaimer padding={15} /> | ||
``` | ||
Default value: ``` 20 ``` | ||
<a name="custom"></a> | ||
@@ -129,3 +68,3 @@ ## Custom content | ||
```typescript jsx | ||
<CookieDisclaimer background='#0079c1' color='#fff'>Custom content <a href={yourLink}>Link</a> other text</CookieDisclaimer> | ||
<CookieDisclaimer background='#000' color='#fff'>JSX custom content</CookieDisclaimer> | ||
``` | ||
@@ -132,0 +71,0 @@ <a name="example"></a> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
32968
16
0
92