1.0.1 • Published 6 years ago

react-font-size-resizer v1.0.1

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

react-font-size-resizer

This package adds buttons that allow you to modify the font size of the entire html React App

NPM JavaScript Style Guide

Install

npm install --save react-font-size-resizer

Usage

import React, { Component } from "react";

import SwitchTextSize from "react-font-size-resizer";

class Example extends Component {
  render() {
    return <SwitchTextSize />;
  }
}

Props

<SwitchTextSize
  default={100} // numerical default font size value
  step={20} // numerical quantity that increases / decreases
  min={60} // numerical min font size value
  max={180} // numerical max font size value
  suffix={"%"} // string suffix property font-size css
  store={localStorage} // object store to save current font size value
  storeKey="SwitchTextSize" // string of store key
/>

Live Demo

https://fcabanasm.github.io/react-font-size-resizer

License

MIT © fcabanasm