This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isBrowser = (typeof window !== 'undefined'); | |
| export default isBrowser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const baseFontSize = 16; | |
| const pxToRem = (px) => { | |
| const value = px / baseFontSize; | |
| return `${value}rem`; | |
| }; | |
| export default pxToRem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { css } from 'react-emotion'; | |
| const retinaBackgroundImage = (path) => { | |
| const extension = path.substring(path.length - 3); | |
| const file = path.substring(0, path.length - 4); | |
| return css` | |
| background-image: url(${file}.${extension}); | |
| @media |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { cx, css } from 'react-emotion'; | |
| class ClassComponent extends React.Component { | |
| render() { | |
| const { | |
| className, | |
| } = this.props; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { cx, css } from 'react-emotion'; | |
| const FunctionalComponent = ({ | |
| className, | |
| }) => { | |
| const wrapperStyle = cx( | |
| css``, | |
| className, |