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 { Composition } from 'atomic-layout' | |
<Composition | |
gutter={10} // compiles to "10px" of "grid-gap" | |
paddingVertical={25} // compiles to "25px" of "padding-top" and "padding-bottom" | |
/> |
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 Layout from 'atomic-layout' | |
Layout.configure({ | |
defaultUnit: 'rem' // append "rem" instead of "px" to all numeric values by default | |
}) | |
// rest of the App code here, such as ReactDOM.render() |
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 { Composition } from 'atomic-layout' | |
<Composition | |
gutter={10} // compiles to "10px" of "grid-gap" | |
padding="2rem" // compiles to explicit "2rem" of "padding" | |
height="95vh" // compiles to explicit "95vh" of "height" | |
/> | |
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
https://github.com/markerikson/redux-starter-kit/issues/17#issuecomment-414091942 |
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
handlePeopleInFlatChange = ({ nextValue }) => { | |
this.setState({ peopleInFlat: nextValue }) | |
} | |
render() { | |
const { peopleInFlat } = this.state | |
return ( |
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 { Form, Field } from 'react-advanced-form' | |
import { Input } from '@fields' | |
export default class RegistrationForm extends React.Component { | |
registerUser = ({ serialized }) => { | |
console.log(serialized) | |
/** | |
* { | |
* billingAddress: { |
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 path = require('path') | |
const webpack = require('webpack') | |
const express = require('express') | |
const WebpackDevServer = require('webpack-dev-server') | |
const webpackHotMiddleware = require('webpack-hot-middleware') | |
const print = require('../bin/utils/print') | |
const getWebpackConfig = require('../webpack.config') | |
const promiseCompile = (compiler) => { | |
return new Promise((resolve, reject) => { |
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 random = (list) => { | |
const index = Math.floor((Math.random() * (list.length)) + 0); | |
return list[index] | |
} | |
function next() { | |
const tenses = ['present', 'past', 'future'] | |
const verbs = ['need', 'must', 'decide', 'forget', 'hope', 'learn', 'offer', 'plan', 'pretend', 'promise', 'promise', 'remember', 'start', 'try', 'want', 'would like', 'enjoy', 'finish', 'hate', 'like', 'love', 'spend (time)', 'stop', 'feel like'] | |
const sentenceType = ['question', 'negative', 'regular'] |
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 YourSlide = () => ( | |
<code> | |
function() {} | |
</code> | |
) | |
export default YourSlide |
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
/* Examples of usage */ | |
// I will leave out scaling feature, as we are looking at the API itself. | |
// styled-system | |
<Box padding={[2, 4, 8]} /> | |
// atomic-layout | |
<Box padding={2} paddingMd={4} paddingLg={8} /> | |
/* Comparison */ | |
// styled-system |