Skip to content

Instantly share code, notes, and snippets.

View haustraliaer's full-sized avatar

David Hauser haustraliaer

View GitHub Profile
@haustraliaer
haustraliaer / classed.js
Last active December 6, 2016 00:05
sssstyled-components v classes
import style from './classedCSS.css'
import classnames from 'classnames'
import React from 'react'
export default React.createClass({
render: function() {
return (
<div
className={classnames("SomeDiv", {
@haustraliaer
haustraliaer / SomeModule.jsx
Last active January 9, 2016 06:06
porque no los dos?
import React from 'react'
import delicious from './yu.m.css'
import ew from './gross.css'
export default React.createClass({
render() {
return (
<div className={`hard-tacos ${delicious['soft-tacos']}`}>yaaaaaayyyy!</div>
)
@haustraliaer
haustraliaer / button.css
Created September 7, 2015 07:34
Modular ceshesh ay
.root {
display: block;
width: 200px;
margin: 40px;
background: none;
border: 1px solid #749ED8;
border-radius: 3px;
padding: 10px 14px;
&:active {
@haustraliaer
haustraliaer / SomeLibraryComponent.jsx
Last active August 29, 2015 14:22
Everything is private to it's local context with no global side effects. But our library component allows it's parent to overide styles (without defining a million props).
var style = require('library.css')
if(typeof this.props.style !== 'undefined') {
// style is just an object (if using webpack/postcss) so we can use js to overide class keys
// (arbitrary merge function)
merge(style, this.props.style)
}
render() {
return (

Keybase proof

I hereby claim:

  • I am haustraliaer on github.
  • I am haustraliaer (https://keybase.io/haustraliaer) on keybase.
  • I have a public key whose fingerprint is 906F B017 7976 9D6D 5ED0 3AE8 394B FDAB 0534 E36D

To claim this, I am signing this object: