GithubHelp home page GithubHelp logo

styled-gen's Introduction

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

styled-gen's People

Contributors

dependabot[bot] avatar psoaresbj avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

styled-gen's Issues

Ease `inSine` have error syntax

There's a syntax error with inSine string in Ease object:
inSine: 'cubic-bezier(0.47, 0, 0.745, 0.715'
(missing parenthesis)
should be inSine: 'cubic-bezier(0.47, 0, 0.745, 0.715')

Variable responsive prop `0` is not working correctly

When using 0 as value for a variable prop, the logic is assuming false.
ex:

Col xs={12} mt={{xs: 2, sm: 0}}>
    {content}
</Col>

For now, just use a string to make it work:

Col xs={12} mt={{xs: 2, sm: '0'}}>
    {content}
</Col>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.