1.0.8 • Published 2 years ago

@jswork/craco-plugin-styled-extension v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

craco-plugin-styled-extension

Some extensions for styled-components in cra.

version license size download

installation

  1. installed packages
npm i styled-components
npm i @jswork/color-rgba @jswork/color-lighten @jswork/color-darken
npm install @jswork/craco-plugin-styled-extension
  1. .eslintrc
  "globals": {
    "styled": true,
    "rgba": true,
  }
  1. src/global.d.ts
import { StyledInterface } from 'styled-components';

declare global {
  const rgba: any;
  const styled: StyledInterface;
}

usage

import cracoPluginStyledExtension from '@jswork/craco-plugin-styled-extension';

// usage goes here.
export const MyFooter = styled.footer`
  font-size: 14px;
  color: ${rgba('#fff', 0.8)};
  position: absolute;
  bottom: 24px;
  width: 100%;
  text-align: center;
`;

license

Code released under the MIT license.

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago