@daisypayments/petals
Advanced tools
Comparing version 0.1.48 to 0.1.49
@@ -5,16 +5,4 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n body {\n padding-top: ", ";\n }\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } | ||
import React from "react"; | ||
import styled, { css, createGlobalStyle } from "styled-components"; | ||
import styled, { css } from "styled-components"; | ||
import { when } from "./grid"; | ||
@@ -25,3 +13,3 @@ var NavbarContainer = styled.div.withConfig({ | ||
})(["box-sizing:border-box;position:", ";top:0;left:0;right:0;background-color:", ";height:", ";border-bottom:1px solid ", ";display:flex;justify-content:center;z-index:2;"], function (props) { | ||
return props["static"] ? "static" : "fixed"; | ||
return props["static"] ? "static" : "sticky"; | ||
}, function (props) { | ||
@@ -34,5 +22,2 @@ return props.theme.layout.navbar.background; | ||
}); | ||
var NavbarPadding = createGlobalStyle(_templateObject(), function (props) { | ||
return props.theme.layout.navbar.size.xs; | ||
}); | ||
var NavbarContent = styled.div.withConfig({ | ||
@@ -51,3 +36,3 @@ displayName: "Navbar__NavbarContent", | ||
return React.createElement(NavbarContainer, props, props["static"] || React.createElement(NavbarPadding, null), React.createElement(NavbarContent, { | ||
return React.createElement(NavbarContainer, props, React.createElement(NavbarContent, { | ||
"static": props["static"], | ||
@@ -54,0 +39,0 @@ wide: wide |
@@ -22,14 +22,2 @@ "use strict"; | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n body {\n padding-top: ", ";\n }\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } | ||
var NavbarContainer = _styledComponents["default"].div.withConfig({ | ||
@@ -39,3 +27,3 @@ displayName: "Navbar__NavbarContainer", | ||
})(["box-sizing:border-box;position:", ";top:0;left:0;right:0;background-color:", ";height:", ";border-bottom:1px solid ", ";display:flex;justify-content:center;z-index:2;"], function (props) { | ||
return props["static"] ? "static" : "fixed"; | ||
return props["static"] ? "static" : "sticky"; | ||
}, function (props) { | ||
@@ -49,6 +37,2 @@ return props.theme.layout.navbar.background; | ||
var NavbarPadding = (0, _styledComponents.createGlobalStyle)(_templateObject(), function (props) { | ||
return props.theme.layout.navbar.size.xs; | ||
}); | ||
var NavbarContent = _styledComponents["default"].div.withConfig({ | ||
@@ -67,3 +51,3 @@ displayName: "Navbar__NavbarContent", | ||
return _react["default"].createElement(NavbarContainer, props, props["static"] || _react["default"].createElement(NavbarPadding, null), _react["default"].createElement(NavbarContent, { | ||
return _react["default"].createElement(NavbarContainer, props, _react["default"].createElement(NavbarContent, { | ||
"static": props["static"], | ||
@@ -70,0 +54,0 @@ wide: wide |
{ | ||
"name": "@daisypayments/petals", | ||
"version": "0.1.48", | ||
"version": "0.1.49", | ||
"description": "Reusable front end components to be used across Daisy Payments", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
312434
6392