{"version":3,"sources":["webpack:///./src/icons/PrinterIcon.js","webpack:///./src/modules/PrintButton/PrintButton.js"],"names":["withHover","_ref","style","rest","_objectWithoutProperties","_excluded","React","Object","assign","viewBox","width","height","_objectSpread","cursor","strokeLinecap","strokeLinejoin","strokeWidth","stroke","fill","strokeMiterlimit","data-color","d","StyledButton","styled","BaseButton","withConfig","displayName","componentId","theme","name","rem","mediaOnly","xs","_templateObject","_taggedTemplateLiteral","mediaQuery","sm","_templateObject2","PrintButton","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","handleMouseEnter","setState","hover","handleMouseLeave","state","key","value","text","this","transition","effects","linkHoverTransition","color","accent","primary","onMouseEnter","onMouseLeave","onClick","window","print","PrinterIcon","defaultProps"],"mappings":"mjDAIA,I,IAuBeA,eAvBK,SAAHC,GAAA,IAAMC,EAAKD,EAALC,MAAUC,EAAIC,EAAAH,EAAAI,GAAA,OACnCC,gBAAA,MAAAC,OAAAC,OAAA,CACEC,QAAQ,aACJN,EAAI,CACRO,MAAM,MACNC,OAAO,MACPT,MAAKU,EAAA,CAAIC,OAAQ,WAAcX,KAE/BI,gBAAA,KACEQ,cAAc,QACdC,eAAe,QACfC,YAAa,EACbC,OAAO,eACPC,KAAK,OACLC,iBAAkB,IAElBb,gBAAA,QAAMc,aAAW,UAAUC,EAAE,gBAC7Bf,gBAAA,QAAMe,EAAE,+DACRf,gBAAA,QAAMc,aAAW,UAAUC,EAAE,uB,+6DCDnC,IAAMC,EAAeC,YAAOC,KAAWC,WAAA,CAAAC,YAAA,4BAAAC,YAAA,eAAlBJ,CAAkB,iLAC1B,SAAAtB,GAAA,IAAG2B,EAAK3B,EAAL2B,MAAK,MACF,SAAfA,EAAMC,MAAkC,SAAfD,EAAMC,KAC3B,OACA,SAOOC,YAAI,IAKHA,YAAI,IAIhBC,IAAUC,GAAEC,MAAAC,EAAA,gCAIZC,IAAWC,GAAEC,MAAAH,EAAA,kCACAJ,YAAI,OAQfQ,EAAW,SAAAC,I,qRAAAC,CAAAF,EAAAC,GAAA,I,MAAAE,EAAAC,EAAAJ,GAIf,SAAAA,EAAYK,GAAc,IAAAC,EAKvB,O,4FALuBC,CAAA,KAAAP,IACxBM,EAAAH,EAAAK,KAAA,KAAMH,IAORI,iBAAmB,WACjBH,EAAKI,SAAS,CAAEC,OAAO,KACxBL,EAEDM,iBAAmB,WACjBN,EAAKI,SAAS,CAAEC,OAAO,KAVvBL,EAAKO,MAAQ,CACXF,OAAO,GACRL,EAoCF,O,EAnCAN,G,EAAA,EAAAc,IAAA,SAAAC,MAUD,WACE,IAAQC,EAASC,KAAKZ,MAAdW,KACAL,EAAUM,KAAKJ,MAAfF,MACAF,EAAuCQ,KAAvCR,iBAAkBG,EAAqBK,KAArBL,iBAGpBhD,E,+VAAKU,CAAA,CACT4C,WAAYC,cAAUC,qBACnB,CAAEC,MAAOV,EAAQU,IAAMC,OAASD,IAAME,UAG3C,OACEvD,gBAACgB,EAAY,CACXwC,aAAcf,EACdgB,aAAcb,EACdc,QAAS,WACHC,QACFA,OAAOC,UAIX5D,gBAAA,KAAGJ,MAAOA,GAAQoD,GAClBhD,gBAAC6D,EAAW,CAACjE,MAAOA,U,8EAGzBoC,EA7Cc,CAAShC,aAApBgC,EACGZ,YAAc,cADjBY,EAEG8B,aAAe,GA8CT9B","file":"static/scripts/print-button-2cfaddcedb3945c0471f.js","sourcesContent":["// @flow\nimport * as React from 'react'\nimport withHover from '../hoc/withHover'\n\nconst PrinterIcon = ({ style, ...rest }: Object) => (\n \n \n \n \n \n \n \n)\n\nexport default withHover>(PrinterIcon)\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { rem } from 'polished'\n\nimport type { AreaTypes } from '../../types/enums/AreaTypes'\n\nimport PrinterIcon from '../../icons/PrinterIcon'\nimport BaseButton from '../../components/Button/BaseButton'\nimport { mediaQuery, mediaOnly } from '../../styles/media'\nimport { effects, color } from '../../styles/theme'\n\nexport type Props = {\n text?: string,\n area?: AreaTypes,\n}\n\ntype State = {\n hover: boolean,\n}\n\nconst StyledButton = styled(BaseButton)`\n display: ${({ theme }) =>\n theme.name === 'kids' || theme.name === 'lgbt'\n ? 'none'\n : 'flex'}; /* hide Breadcrumbs on kids/lgbt theme, quick'n'dirty */\n\n margin-top: -3px; /* To align with other Article top element */\n\n z-index: 1;\n position: absolute;\n right: 0;\n padding: 0 ${rem(30)};\n flex-direction: row;\n align-items: center;\n\n p {\n margin: 0 ${rem(24)} 0 0;\n }\n\n /* Hide on mobile */\n ${mediaOnly.xs`\n display: none;\n `}\n\n ${mediaQuery.sm`\n padding: 0 ${rem(100)}; \n `}\n\n @media print {\n display: none;\n }\n`\n\nclass PrintButton extends React.Component {\n static displayName = 'PrintButton'\n static defaultProps = {}\n\n constructor(props: Props) {\n super(props)\n\n this.state = {\n hover: false,\n }\n }\n\n handleMouseEnter = () => {\n this.setState({ hover: true })\n }\n\n handleMouseLeave = () => {\n this.setState({ hover: false })\n }\n\n render() {\n const { text } = this.props\n const { hover } = this.state\n const { handleMouseEnter, handleMouseLeave } = this\n\n //This component is only used in the `main` theme so we can use the styling like this\n const style = {\n transition: effects().linkHoverTransition,\n ...{ color: hover ? color.accent : color.primary },\n }\n\n return (\n {\n if (window) {\n window.print()\n }\n }}\n >\n {text}\n \n \n )\n }\n}\n\nexport default PrintButton\n"],"sourceRoot":""}
{text}