A React wrapper for the Adobe Web Platform's Balance-Text Project
JavaScript Shell
Switch branches/tags
Nothing to show
Clone or download
mpolyak Update react-balance-text with support for React 16.3.0
As part of upgrading to React 16 in webapp, we need to update this component.
Specifically, changing `React.PropTypes` use cases to require `prop-types` library.

I had to change storybook to `@storybook/react` in order to make it work.
As well, I changed `babel-*` to approximately equivalent to version in
package.json in order for transpiled `dist/index.js` to utilize `require`
instead of `import`.

Test Plan:
 - Run `npm run prepublish` and verify `dist/index.js` is built successfully.
 - Run `npm run storybook` and browse examples in `http://localhost:9010/`

Reviewers: briangenisio, emily, scottgrant

Reviewed By: briangenisio

Subscribers: tom, john

Differential Revision: https://phabricator.khanacademy.org/D45522
Latest commit 92ec85c Jun 11, 2018


React Balance Text Component

This is a React wrapper around the Adobe Web Platform's Balance-Text Project with the jQuery dependancy removed.

See a live demo


<BalanceText style={containerTextStyle}>
    Chocolate bar oat cake chocolate toffee apple pie donut soufflé. Chupa chups pudding tootsie roll muffin sugar plum lemon drops. Ice cream dessert muffin chocolate. Topping lollipop bear claw candy danish topping wafer.