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:
Dimitris Fasoulas
2018-06-21 18:33:53 +02:00
committed by Rick van Lieshout
parent d601613b5a
commit 2d1501457b
3 changed files with 7 additions and 5 deletions

View File

@@ -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,