Skip to content

Instantly share code, notes, and snippets.

View magsout's full-sized avatar
🦊
Coding and hacking around the world

Guillaume Démésy magsout

🦊
Coding and hacking around the world
View GitHub Profile
import React from "react"
const NewlineToBreak = props => {
const { text } = props
return (
<span>
{text.split("\n").map((item, key) => <span key={key}>{item}<br /></span>)}
</span>
)
window.matchMedia = window.matchMedia || (() => {
return {
matches : true,
addListener : () => {},
removeListener: () => {},
};
});
import "../../../../scripts/test-setup.js"
import React from "react";
import renderer from "react-test-renderer";
import sinon from "sinon";
import {shallow} from "enzyme";
import { BrowserRouter as Router } from "react-router-dom";
import Header from "../";
"use strict";
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*global WindowHelpers:true*/
const intern = require("intern").default;
const { assert } = intern.getPlugin("chai");
const { registerSuite } = intern.getInterface("object");
const FunctionalHelpers = require("./lib/helpers.js");
{
"name": "cssrecipes-grid",
"version": "1.0.0",
"description": "BEMish grid component",
"keywords": [
"browser",
"style",
"css",
"css-components",
"css-recipes",
/** @define Masonry */
.sf-Masonry {
column-count: 4;
column-gap: 1em;
}
.sf-Masonry-item {
width: 100%;
display: inline-block;
}
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@magsout
magsout / webpack.config.js
Created July 13, 2015 13:06
Webpack + cssnext-loader + stylelint + file-loader
// webpack.config.js
var webpack = require("webpack")
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var path = require("path")
var options = require("minimist")(process.argv.slice(2))
var pathDest = (options.docs) ? "./docs" : "./build"
var cssnext = require("cssnext-loader")
var configSuitcss = require("stylelint-config-suitcss")
var ext = function ext() {
@magsout
magsout / webpack.conf.js
Last active August 29, 2015 14:21
Simple webpack config
// webpack.config.js
var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require("path");
module.exports = {
// The standard entry point and output config
entry: {
app: "./app"
},
@magsout
magsout / SassMeister-input.scss
Created May 19, 2015 09:32
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
$color : #D22C88;
.foo {
/*
border-top: solid 1px #22bfcc;