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 ModalWrapper from '../ModalWrapper.jsx'; | |
| const SignIn = props => { | |
| const signIn = provider => { | |
| props.hideModal(); | |
| props.signIn(provider); | |
| }; |
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
| /* ---------------------- */ | |
| /* ---- Neat Imports ---- */ | |
| /* ---------------------- */ | |
| /* -- webpack.config.shared.js -- */ | |
| export const sharedConfig = { | |
| alias: { | |
| 'Utils': path.resolve(__dirname, '../src/app/utils/'), | |
| }, | |
| }; |
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'; | |
| const {PropTypes} = React; | |
| const ModalWrapper = props => { | |
| const handleBackgroundClick = e => { | |
| if (e.target === e.currentTarget) props.hideModal(); | |
| }; | |
| const onOk = () => { | |
| props.onOk(); |
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
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
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
| function makeElement(type, props, text) { | |
| const el = document.createElement(type); | |
| Object.keys(props).forEach(prop => { | |
| el[prop] = props[prop]; | |
| }); | |
| const textNode = document.createTextNode(text); | |
| el.appendChild(textNode); |
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
| /* -- webpack.config.shared.js -- */ | |
| export const sharedConfig = { | |
| alias: { | |
| 'Utils': path.resolve(__dirname, '../src/app/utils/'), | |
| 'Components': path.resolve(__dirname, '../src/app/components/'), | |
| }, | |
| }; | |
| /* -- webpack.config.dev.js -- */ |
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
| this.externalWindow = window.open(/* ... */); | |
| copyStyles(document, this.externalWindow.document); |
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
| function copyStyles(sourceDoc, targetDoc) { | |
| Array.from(sourceDoc.styleSheets).forEach(styleSheet => { | |
| if (styleSheet.cssRules) { // for <style> elements | |
| const newStyleEl = sourceDoc.createElement('style'); | |
| Array.from(styleSheet.cssRules).forEach(cssRule => { | |
| // write the text of each rule into the body of the style element | |
| newStyleEl.appendChild(sourceDoc.createTextNode(cssRule.cssText)); | |
| }); |
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
| ease({ | |
| startValue: window.scrollY, | |
| endValue: 0, | |
| onStep: value => window.scroll(0, value), | |
| onComplete: () => { | |
| document.querySelector('#search').focus(); | |
| } | |
| }); |
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
| ease({ | |
| startValue: window.scrollY, | |
| endValue: 0, | |
| onStep: value => window.scroll(0, value), | |
| }); |