styled-components-extended
v0.1.2
Published
An extention of Styled Components and Styled System that adds organisation to the CSS properties
Downloads
6
Readme
Extended Syled Components (WIP)
Version: 0.1.2
Because I liked the objective approach to styled-components so much I decided to create a utility function that takes a 'properties' object which groups specific types of CSS properties and merges them; making the written CSS much easier to read and (most importantly) helps reduce repetition.
Components that use this utility function can be extended with further properties passed via props (without the need to use the method again). Note: if you use this on a component that extends another, you will see duplicate CSS which can get confusing.
This method also takes a set of 'primitive'/base CSS properties via the theme.js (via the Styled Components Theme Provider). The method will check for a primitives property on the theme JSON that is passed via the Styled Components props (basic example below).
styled(props => doSomethingWith(props.theme))
This repo is primarily used by the primitive components repo: a repo that contains a library of 'primitive' components that I use as the basis for all other component (UI) development (in this case every component I build has a primitive component at it's care [which calls this method]).