@idot-digital/fit-text
v1.1.0
Published
Fit any text, centered to available width and height
Downloads
2
Readme
@idot-digital/fit-text
Fit any text, centered to available width and height
Install
npm install --save @idot-digital/fit-text
yarn add @idot-digital/fit-text
Usage
import React, { Component } from 'react'
import TextFit from '@idot-digital/fit-text'
class Example extends Component {
render() {
/* targetSize in px */
/* alignItems for vertical centering */
/* textAlign for horizontal centering */
return (
<TextFit
text='Some text...'
targetSize={10}
alignItems='start'
textAlign='left'
/>
)
}
}
License
UNLICENSED © @idot-digital