styled-conditions

    1.0.2 • Public • Published

    👨‍🎨
    Styled Conditions

    npm npm bundle size (minified + gzip) Travis CI Build PRs Welcome

    Flag utility for emotion CSS-in-JS to conditionally apply css depending on React props including support for styled-system.

    Install

    npm i --save styled-conditions

    Usage

    import styled from '@emotion/styled';
    import { is } from 'styled-conditions';
     
    const Button = styled(MyComponent)`
      ${is('black')`
        color: black;
      `}
     
      ${isNot('devil')`
        color: ${props => props.theme.colors.colorForAngels};
      `}
    `;

    License

    MIT

    Install

    npm i styled-conditions

    DownloadsWeekly Downloads

    15

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    8.57 kB

    Total Files

    10

    Last publish

    Collaborators

    • karolisgrinkevicius