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

@@ -701,7 +701,8 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var OPTIONS = exports.OPTIONS = {
TOP: "top",
BOTTOM: "bottom"
BOTTOM: "bottom",
NONE: "none"
};
var CookieConsent = function (_Component) {
@@ -855,7 +856,7 @@ var CookieConsent = function (_Component) {
}(_react.Component);
CookieConsent.propTypes = {
location: _propTypes2.default.oneOf(["top", "bottom"]),
location: _propTypes2.default.oneOf(Object.values(OPTIONS)),
style: _propTypes2.default.object,
buttonStyle: _propTypes2.default.object,
contentStyle: _propTypes2.default.object,