├── demo ├── entry.js ├── Ad.jsx ├── TweetButton.jsx ├── base.css └── Demo.jsx ├── webpack.config.js ├── README.md ├── index.html ├── package.json ├── src └── FitterHappierText.jsx └── FitterHappierText.js /demo/entry.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react' 3 | import Demo from './Demo.jsx' 4 | import css from './base.css' 5 | 6 | React.render(React.createElement(Demo), document.querySelector('#demo')) 7 | 8 | -------------------------------------------------------------------------------- /demo/Ad.jsx: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react' 3 | 4 | class Ad extends React.Component { 5 | 6 | render () { 7 | return ( 8 |
79 | Source: 80 | 83 | HTML Design Principles 84 | 85 |
86 |npm i react-fitter-happier-text90 |
91 | {`var FitterHappierText = require('react-fitter-happier-text')
92 | React.render( , document.querySelector('#hello-world'))`}
93 |
94 | Note: this component relies on element.offsetWidth and only works in client-side contexts.