mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-08-23 09:35:04 +02:00
Allow location none, to disable automatic location styling. Closes gi… (#17)
Fixes #16 Allows location property to receive string `none` which will disable automatic placement of the component.
This commit is contained in:
@@ -4,7 +4,8 @@ import Cookies from "js-cookie";
|
||||
|
||||
export const OPTIONS = {
|
||||
TOP: "top",
|
||||
BOTTOM: "bottom"
|
||||
BOTTOM: "bottom",
|
||||
NONE: "none"
|
||||
};
|
||||
|
||||
class CookieConsent extends Component {
|
||||
@@ -131,7 +132,7 @@ class CookieConsent extends Component {
|
||||
}
|
||||
|
||||
CookieConsent.propTypes = {
|
||||
location: PropTypes.oneOf(["top", "bottom"]),
|
||||
location: PropTypes.oneOf(Object.values(OPTIONS)),
|
||||
style: PropTypes.object,
|
||||
buttonStyle: PropTypes.object,
|
||||
contentStyle: PropTypes.object,
|
||||
|
Reference in New Issue
Block a user