UNPKG

@crave/farmblocks-footer

Version:
40 lines (38 loc) 1.56 kB
import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; import { colors as colorConstants } from "@crave/farmblocks-theme"; import HelperContent from "./HelperContent"; const Container = styled.div.withConfig({ displayName: "Footer__Container", componentId: "sc-b21uxq-0" })(["font-family:Lato,sans-serif;background-color:", ";border-top:solid 1px ", ";padding:16px 24px;display:flex;justify-content:space-between;"], colorConstants.SUGAR, colorConstants.GREY_16); Container.displayName = "FooterContainer"; const ActionsContainer = styled.div.withConfig({ displayName: "Footer__ActionsContainer", componentId: "sc-b21uxq-1" })(["display:flex;align-items:center;align:flex-end;> *{margin-left:16px;}"]); const Footer = props => /*#__PURE__*/React.createElement(Container, { className: props.className }, /*#__PURE__*/React.createElement(HelperContent, { className: "helperContent", text: props.helpText, linkText: props.helpLinkText, linkHref: props.helpLinkHref, imageSrc: props.helpImageSrc, linkOnClick: props.onHelpLinkClick, size: props.helpFontSize }), /*#__PURE__*/React.createElement(ActionsContainer, { className: "actionsContainer" }, props.actions)); Footer.propTypes = { helpImageSrc: PropTypes.string, helpText: PropTypes.string, helpLinkText: PropTypes.string, helpLinkHref: PropTypes.string, onHelpLinkClick: PropTypes.func, helpFontSize: PropTypes.number, actions: PropTypes.arrayOf(PropTypes.node), className: PropTypes.string }; export default Footer;