0.0.2 • Published 9 years ago
react-responsive-type v0.0.2
React Responsive Text
is a high order wrapper based on http://simplefocus.com/flowtype/
Usage
Just import and wrap with your desired settings
import ReactResponsiveText from 'react-responsive-type';
...
class SomeApp extends Component{
...
}
export default ReactResponsiveText(SomeApp,{
minimum: 500,
maximum: 1200
});
Settings
- minimum: The minimum element width text will stop being resize
- maximum: The minimum element width text will stop being resize
- minFont: The minimum font size that the element will be resized to
- maxFont: The maximum font size that the element will be resized to
- fontRatio: When using your own font-size use this setting to adjust font sizes(bigger numbers will make the font smaller and vice versa)
Issues / PR
If you found any issue with this module, please let me know.
Thanks
- gianu for inspiration
- FlowType.JS for help with the magic ;)