UNPKG

@buffetjs/styles

Version:

Buffetjs Styles - The styling solution of Buffetjs

18 lines (16 loc) 1.01 kB
var _templateObject; function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } import styled from 'styled-components'; import PropTypes from 'prop-types'; import colors from '../../assets/styles/colors'; import sizes from '../../assets/styles/sizes'; var IconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: calc(", " - 2px);\n height: calc(", " - 2px);\n color: ", ";\n position: absolute;\n left: 1px;\n top: 1px;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n"])), sizes.input.height, sizes.input.height, colors.greyIconColor, function (props) { return props.background ? colors.greyIconBkgd : 'transparent'; }); IconWrapper.defaultProps = { background: true }; IconWrapper.propTypes = { background: PropTypes.bool }; export default IconWrapper;