Back to React Sketchapp

Styled-components

examples/styled-components/README.md

3.2.2686 B
Original Source

Styled-components

How to use

Download the example or clone the repo:

bash
curl https://codeload.github.com/airbnb/react-sketchapp/tar.gz/master | tar -xz --strip=2 react-sketchapp-master/examples/styled-components
cd styled-components

Install the dependencies

bash
npm install

Then, open Sketch and navigate to Plugins → react-sketchapp: Styled components

Run it in Sketch

Run with live reloading in Sketch

bash
npm run render

The idea behind the example

styled-components allows you to write actual CSS code to style your components. It also removes the mapping between components and styles