psoaresbj / styled-gen

Set of tools for styled-components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

styled-gen

Set of tools for styled-components

NPM JavaScript Style Guide

If you're migrating from v1 to v2, follow the migration guide.

What is styled-gen?

styled-gen is a collection of helper functions that simplify the integration of multiple styles as React props within your styled components. It provides shorthand properties for managing layout components without the need to style them separately.

generateProps usage example:

import { generateProps } from 'styled-gen';
import styled from 'styled-components';

cons MyStyledComp = styled.div`
  // your css...

  ${generateProps};
`;

export const MyComponent = () => (
  <div>
    <MyStyledComp $tAlign={{ md: 'center', xs: 'left' }}>
      Vestibulum auctor dapibus neque.
    </MyStyledComp>
  </div>
)

Documentation

Visit https://docs.page/psoaresbj/styled-gen to view full documentation.

License

MIT © psoaresbj

About

Set of tools for styled-components


Languages

Language:TypeScript 90.5%Language:Shell 6.2%Language:JavaScript 1.9%Language:HTML 1.4%