0.5.1 • Published 6 years ago

html-measure v0.5.1

Weekly downloads
30
License
-
Repository
-
Last release
6 years ago

html-measure

NPM version NPM Downloads

Make html to be measurable written by React

npm.io

Installation

npm install html-measure
# or use yarn
yarn add html-measure

Usage

import HtmlMeasure from 'html-measure'
import 'html-measure/style.css'
// or
import 'html-measure/style.less'

ReactDOM.render(<HtmlMeasure html="<div>foo</div>" />, window.root)

Props

className

  • Type: string

style

  • Type: object

html

  • Type: string

unit

  • Type: one of 'px' | 'rem'
  • Default: 'px'

remStandardPx

  • Type: number
  • Default: 16

scaleGapPx

npm.io

The size of the read rect in the above picture.

  • Type: number
  • Default: 10

isShowUnit

  • Type: boolean
  • Default: true

isCalcContainerWidth

  • Type: boolean
  • Default: true

numberFixed

  • Type: number
  • Default: 0

Authors

This library is written and maintained by imcuttle, moyuyc95@gmail.com.

License

MIT

0.5.1

6 years ago

0.4.1

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago