Skip to content

Instantly share code, notes, and snippets.

View patientplatypus's full-sized avatar

patientplatypus patientplatypus

View GitHub Profile
@patientplatypus
patientplatypus / gist:c0f56e5f0de4c3e4dcec0ba2ef0fab89
Created May 28, 2017 00:12
unexpected token on function inside react class
import React, { Component } from 'react';
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css'
import axios from 'axios';
import ListGoal from './ListGoal';
import React, { Component } from 'react';
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css'
import axios from 'axios';
import ListGoal from './ListGoal';
import React, { Component } from 'react';
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css'
import axios from 'axios';
import ListGoal from './ListGoal';
@patientplatypus
patientplatypus / emojichoosenotworking.jsx
Created July 20, 2017 18:51
EmojiChoose is not rendering the variable (it's just blank)
// https://github.com/diegohaz/arc/wiki/Atomic-Design
import React, { Component } from 'react'
import { Badge, IconButton, Heading, Paragraph, ParagraphHolder, PrimaryNavigation, Blockquote } from 'components'
import styled from 'styled-components'
import ReactDOM from 'react-dom'
const FlexContainer = styled.div`
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
@patientplatypus
patientplatypus / emojiplay.jsx
Created July 21, 2017 23:06
I have an emoji that is rotating but not starting big and shrinking (react-motion). Does anyone see the error?
import React, { Component } from 'react'
import { Badge, IconButton, Heading, Paragraph, ParagraphHolder, PrimaryNavigation, Blockquote } from 'components'
import styled from 'styled-components'
import ReactDOM from 'react-dom'
import renderIf from 'render-if'
import glamorous from "glamorous";
@patientplatypus
patientplatypus / fixmapping.jsx
Created July 21, 2017 23:58
addEmojis render slows down when too many
// https://github.com/diegohaz/arc/wiki/Atomic-Design
import React, { Component } from 'react'
import { Badge, IconButton, Heading, Paragraph, ParagraphHolder, PrimaryNavigation, Blockquote } from 'components'
import styled from 'styled-components'
import ReactDOM from 'react-dom'
import EmojiAdder from './EmojiAdder';
const FlexContainer = styled.div`
display: -webkit-flex;
display: flex;
@patientplatypus
patientplatypus / navlinksbroken.jsx
Created July 23, 2017 14:22
Whatever I do the NavLinks are unclickable
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { palette } from 'styled-theme'
import glamorous from 'glamorous';
import { Link } from 'components';
import NavLink from 'react-router-dom/Navlink';
const NavGlam = glamorous.div(
{
@patientplatypus
patientplatypus / tornado.jsx
Created July 23, 2017 20:09
need to cycle between tornado divs on click and onrest - cant change state from render so this is no-go
// https://github.com/diegohaz/arc/wiki/Atomic-Design
import React, { Component } from 'react'
import { Badge, IconButton, Heading, Paragraph, AlignContainer, ParagraphHolder, PrimaryNavigation, PrimaryNavigationGlam, Blockquote } from 'components'
import styled from 'styled-components'
import CanvasContainer from './CanvasContainer';
import renderIf from 'render-if'
import EmojiSelector from './EmojiSelector';
import glamorous from "glamorous";
import {Motion, spring} from 'react-motion';
import { observable, action } from 'mobx';
@patientplatypus
patientplatypus / scaredtoobig.jsx
Created July 23, 2017 20:44
child css not overriding parents and i dont know why
const EmojiGlamor = glamorous.div(
{
position: 'absolute',
backgroundColor: 'red',
borderRadius: "20px",
marginTop: '-20px',
marginLeft: '10px',
marginRight: '10px'
},
({size})=>({
@patientplatypus
patientplatypus / emojikiss.jsx
Created July 24, 2017 19:12
emojikiss renderif is not firing after motion calls onrest
// https://github.com/diegohaz/arc/wiki/Atomic-Design
import React, { Component } from 'react'
import { Badge, IconButton, Heading, Paragraph, ParagraphHolder, PrimaryNavigation, Blockquote } from 'components'
import styled from 'styled-components'
import ReactDOM from 'react-dom'
import renderIf from 'render-if'
import {Motion, spring} from 'react-motion';
import glamorous from "glamorous";