class-css-stringify
TypeScript icon, indicating that this package has built-in type declarations

1.0.29 • Public • Published

class-css-stringify

一个对 react-style 类型对象字符串化的库。

Quick Start

运行一个简单的示例程序。

const { getStyleString, getKeyframesString } = require("class-css-stringify");

const styleString = getStyleString('my-ui', {
  color: 'red',
  fontSize: 12,
  flex: 1,
})

const keyframesString = getKeyframesString('my-keyframe', {
  from: {
    color: 'red'
  },
  to: {
    color: 'blue'
  }
})

console.log(styleString) // .my-ui{color: red;font-size: 12px;flex: 1;}
console.log(keyframesString) // @keyframes my-keyframe{from{color:red;}to{color:blue;}}

Readme

Keywords

none

Package Sidebar

Install

npm i class-css-stringify

Weekly Downloads

32

Version

1.0.29

License

ISC

Unpacked Size

22.7 kB

Total Files

22

Last publish

Collaborators

  • tang-jia-hui