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 { themr } from 'react-css-themr'; | |
import classnames from 'classnames'; | |
import { FLEX } from '../identifiers'; | |
const Flex = ({ | |
alignContent, | |
alignItems, | |
children, |
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
// Only display content to screen readers | |
// | |
// See: http://a11yproject.com/posts/how-to-hide-content/ | |
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ | |
.sr-only { | |
position: absolute; | |
width: 1px; | |
height: 1px; | |
padding: 0; |
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
// Generate unique IDs for use as pseudo-private/protected names. | |
// Similar in concept to | |
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>. | |
// | |
// The goals of this function are twofold: | |
// | |
// * Provide a way to generate a string guaranteed to be unique when compared | |
// to other strings generated by this function. | |
// * Make the string complex enough that it is highly unlikely to be | |
// accidentally duplicated by hand (this is key if you're using `ID` |
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
/* reset */ | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strong, sub, sup, var, | |
b, u, i, dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td, | |
article, aside, canvas, details, embed, |
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
// File: .storybook/config.js | |
import { configure, addDecorator } from '@kadira/storybook'; | |
import Theme from './../src/ui/theme'; | |
import React from 'react'; | |
import { ThemeProvider } from 'styled-components' | |
function loadStories() { | |
require('../stories'); | |
} |
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 '~shared/sass/base/variables'; | |
.switch-title { | |
font-weight: $bold; | |
margin-bottom: 6px; | |
} | |
.switch-field input { | |
position: absolute !important; | |
clip: rect(0, 0, 0, 0); |
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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var prefix = require('gulp-autoprefixer'); | |
var bourbon = require('node-bourbon'); | |
bourbon.includePaths | |
var imagemin = require('gulp-imagemin'); | |
var merge = require('merge-stream'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var notify = require('gulp-notify'); | |
var browserSync = require('browser-sync').create(); |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>HTML Page Template</title> | |
<link href="css/main.css" rel="stylesheet"> | |
</head> | |
<body> |
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 makeIncrementer(x) { | |
return function() { | |
return x++; | |
}; | |
} | |
var increment = makeIncrementer(0); | |
console.log(increment()); //0 | |
console.log(increment()); //1 |