Skip to content

Instantly share code, notes, and snippets.

View Chun-Lin's full-sized avatar

Gary Wu Chun-Lin

View GitHub Profile
@Chun-Lin
Chun-Lin / Content.jsx
Created August 23, 2018 08:24
This is Content.jsx modify Title's color with styled-components
import React from 'react'
import styled from 'styled-components'
const ContentWrapper = styled.div`
width: 80%;
height: 300px;
box-shadow: 0 0 5px 2px #ccc;
`
const Img = styled.div`
@Chun-Lin
Chun-Lin / Content.jsx
Created August 23, 2018 09:08
Content.jsx render function
export default ({ skyblue }) => {
return (
<ContentWrapper>
<Img />
<InfoWrapper>
<Title skyblue>Cute Puppy</Title>
<Description>
Sed ut voluptatem neque cumque. Qui sed ut itaque est doloribus qui.
Eos perferendis autem qui fugiat.
</Description>
@Chun-Lin
Chun-Lin / Content.jsx
Created August 23, 2018 10:02
Content.jsx combined with styled-components and CSS selector
import React from 'react'
import styled from 'styled-components'
const Content = ({ skyblue, className }) => {
return (
<div className={className}>
<div className="content__img" />
<div className="content__info">
<div className="content__title" skyblue>
Cute Puppy
@Chun-Lin
Chun-Lin / appEntryPoint.js
Created October 24, 2019 03:10 — forked from markerikson/appEntryPoint.js
Webpack React/Redux Hot Module Reloading (HMR) example
import React from "react";
import ReactDOM from "react-dom";
import configureStore from "./store/configureStore";
const store = configureStore();
const rootEl = document.getElementById("root");