Skip to content

Instantly share code, notes, and snippets.

View ndelangen's full-sized avatar
🇳🇱
yes?

Norbert de Langen ndelangen

🇳🇱
yes?
  • Chroma Software
  • Netherlands
View GitHub Profile
@shilman
shilman / sb-agenda-2019-02-04.md
Last active February 4, 2019 08:30
Storybook Monthly Agenda 2019-02-04

Storybook Monthly Agenda 2019-02-04

Introduction - 5m

  • Welcome
  • Self-introductions

5.0 release - 20m

  • Schedule (Jan 13 alpha / Jan 31 beta / Feb 4 RC ? / Feb 18 Release/Announce?)
  • Latest update
  • Outstanding UI issues
import React from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
function stylifier(higherOrderComponent) {
return Component => styles => {
function StyledComponent(props) {
const { classes, className, ...other } = props;
return <Component className={classNames(classes.root, className)} {...other} />;
}
@dmitrythaler
dmitrythaler / JSON.replacer.js
Created March 27, 2017 12:49
replacer function for the JSON.stringify() with depth and duplicates control
const replacer = function( depth = Number.MAX_SAFE_INTEGER ) {
let objects, stack, keys;
return function(key, value) {
// very first iteration
if (key === '') {
keys = ['root'];
objects = [{keys: 'root', value: value}];
stack = [];
return value;
}