0.0.10 • Published 7 years ago

react-greedy-text v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

React Greedy Text

Example

Installation

yarn add react-greedy-text

or

npm install -S react-greedy-text

Example

import React, { Component } from 'react';
import GreedyText from 'react-greedy-text';
import './App.css';

class App extends Component {
  render() {
    return (
      <div className="App">
        <header>
          <GreedyText>
            Greedy Text!
          </GreedyText>
        </header>

        <main style={{ flex: 1, display: 'flex' }}>
          <div style={{ flex: 1 }}>
            <GreedyText>
              Greedy Text does a binary search to quickly maximize the font-size that will fill
              its parent container without overflowing.
            </GreedyText>
          </div>

          <div style={{ flex: 1, padding: '0px 40px' }}>
            <GreedyText>
              “I mean I guess if you had no other option...”
            </GreedyText>
          </div>
        </main>
      </div>
    );
  }
}

export default App;
0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago