1.3.10-test4 • Published 7 years ago

react-text-overflow-middle-ellipsis v1.3.10-test4

Weekly downloads
116
License
MIT
Repository
github
Last release
7 years ago

react-text-overflow-middle-ellipsis

Installation

To install, you can use npm or yarn:

$ npm install react-text-overflow-middle-ellipsis
$ yarn add react-text-overflow-middle-ellipsis

Usage

Using like other react components.

Make sure component instance is wraped by element with default width (such as flex: 1), and component is the only child element.

Examples

import React, { Component } from 'react'
import EllipsisText from 'react-text-overflow-middle-ellipsis'

class TestComponent extends Component {

    render() {
        return (
            <div style={width: '100px'}>
                <EllipsisText text="Long Long Long Long Long Long Text" className={'centerText'}>
            </div>
        )
    }
}

Render Result

Original text:

Long Long Long Long Long Long Text

Render output:

Long L..Text

DEMO

DEMO1

TODO

  1. Support emoji croping.
  2. The only child element is non-essential.
1.3.10-test4

7 years ago

1.3.10-test3

7 years ago

1.3.10-test2

7 years ago

1.3.10-test

7 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago