
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress and the added benefits of TypeScript 💅
npm install --save styled-components styled-components-ts
Getting Started
// Import react, styledComponents and styledComponentsTS // Create an interface for the component // Create a styled component with our props interface
Now we have all the typescript goodies for MyImage like type checking and auto-complete.
import MyImage from './MyImage' <MyImage = ="blue" = />
We can also extend our components and add new props with ease.
// Import react, styledComponents and styledComponentsTS // Import our image and it's props // Create an interface for the component that extends the base image props // Create a styled component with our props interface that extends MyImage
For more information please see https://github.com/styled-components/styled-components