0.2.1 • Published 5 years ago

react-fitclamp v0.2.1

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

react-fitclamp

Trims

NPM JavaScript Style Guide

Install

npm install --save react-fitclamp

Usage

import React, { Component } from "react"

import FitClamp from "react-fitclamp"

class Example extends Component {
  render() {
    const containerClass = "card-medium"
    const textSizes = ["size-1", "size-2", "size-3"]
    const text = "Lorem ipsum dolor sit amet"

    return (
      <FitClamp className={containerClass} textClasses={textSizes}>
        {text}
      </FitClamp>
    )
  }
}

Make sure the CSS for textClasses contains line-height setting in percentages, integers or pixels. Keywords like "normal" will not work.

License

MIT © some1else

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago