Skip to content

Instantly share code, notes, and snippets.

View alexvcasillas's full-sized avatar
🏠
Working from home

Alex Casillas alexvcasillas

🏠
Working from home
View GitHub Profile
@alexvcasillas
alexvcasillas / styled-button.jsx
Last active April 28, 2017 11:36
Little question about Styled-Components integration with MobX
import { inject, observer } from 'mobx-react';
import styled from 'styled-components';
const Button = styled.button`
background: linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%);
border-radius: ${props => props.ui.borderRadius}px;
border: 0;
outline: none;
color: ${props => props.ui.textColor};
text-transform: uppercase;
@alexvcasillas
alexvcasillas / language_store.js
Last active March 13, 2017 08:23
Language Store in MobX
import { observable, computed, action, reaction } from 'mobx';
import esES from '../language/i18n/es';
import enUS from '../language/i18n/en';
export default class LanguageStore {
@observable language;
@computed get resource() {
switch (this.language) {