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
| { | |
| "background_color": "#ffffff", | |
| "categories": [ | |
| "social", | |
| "news", | |
| "magazines" | |
| ], | |
| "description": "Get breaking news, politics, trending music, world events, sports scores, and the latest global news stories as they unfold - all with less data.", | |
| "display": "standalone", | |
| "icons": [ |
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 dots(width, height, density) { | |
| for (let i = 0; i < density; i += 1) { | |
| createDot( | |
| Math.floor(Math.random() * width), | |
| Math.floor(Math.random() * height), | |
| ); | |
| } | |
| } | |
| function createDot(x, y) { |
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
| { | |
| "ok": true, | |
| "assignments": { | |
| "handlebars_from_smarty_perf": { | |
| "experiment_id": "46172931351", | |
| "type": "user", | |
| "group": "", | |
| "trigger": "finished", | |
| "log_exposures": false, | |
| "exposure_id": "3848131076" |
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 Parent() { | |
| return ( | |
| <Heading tag="h2">Hello World</Heading> | |
| ); | |
| } |
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, { PropTypes } from 'react'; | |
| import { StyleSheet, css } from 'aphrodite/no-important'; | |
| import { spacing } from '../../styles/base/spacing'; | |
| function Card(props) { | |
| return ( | |
| <div className={css(styles.card)}> | |
| {props.children} | |
| </div> | |
| ); |
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, { PropTypes } from 'react'; | |
| import { spacing } from '../../base/spacing'; | |
| function getSpacingSize(size) { | |
| return `space${size}`; | |
| } | |
| function Spacing(props) { | |
| return ( | |
| <div style={{ marginBottom: spacing[getSpacingSize(props.size)] }}> |
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 { spacing } from '../styles/base/spacing'; | |
| ... | |
| const styles = StyleSheet.create({ | |
| button: { | |
| marginBottom: spacing.space4, // adding margin using spacing constant | |
| ... | |
| }, | |
| }); |
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 spacingFactor = 8; | |
| export const spacing = { | |
| space0: `${computeGoldenRatio(spacingFactor, 0)}px`, // 8 | |
| space1: `${computeGoldenRatio(spacingFactor, 1)}px`, // 13 | |
| space2: `${computeGoldenRatio(spacingFactor, 2)}px`, // 21 | |
| space3: `${computeGoldenRatio(spacingFactor, 3)}px`, // 34 | |
| space4: `${computeGoldenRatio(spacingFactor, 4)}px`, // 55 | |
| space5: `${computeGoldenRatio(spacingFactor, 5)}px`, // 89 | |
| }; |
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 spacingFactor = 8; | |
| export const spacing = { | |
| space0: `${spacingFactor / 2}px`, // 4 | |
| space1: `${spacingFactor}px`, // 8 | |
| space2: `${spacingFactor * 2}px`, // 16 | |
| space3: `${spacingFactor * 3}px`, // 24 | |
| space4: `${spacingFactor * 4}px`, // 32 | |
| space5: `${spacingFactor * 5}px`, // 40 | |
| space6: `${spacingFactor * 6}px`, // 48 |
NewerOlder