styled-components-style-utils

1.2.1 • Public • Published

Styled Components Style Utils

Several style utils for styled components. SASS mixins converted to JS functions in ES6.

Installation

To install, run

yarn add styled-components-style-utils

or

npm i styled-components-style-utils

Import

To import methods, use

import { method1, method } from 'styled-components-style-utils';

or

const { method1, method } = require('styled-components-style-utils');

Usage

Method call Arguments What the method does
reset() - Will return CSS for CSS reset
debug() - Will add CSS debug mode
center(type) type(string): both|vertical|horizontal Will add flexbox CSS to center children vertically, horizontally, or both
Truncate() - Will add truncate CSS for text, width must be set separately

Why

I made this package because I often use these utils, and wanted them to store somewhere centrally, and open for others to use.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    0
  • 1.2.0
    0
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i styled-components-style-utils

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

62.1 kB

Total Files

11

Last publish

Collaborators

  • lucianonooijen