1.3.10-test4 • Published 6 years ago

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

Weekly downloads
116
License
MIT
Repository
github
Last release
6 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

6 years ago

1.3.10-test3

6 years ago

1.3.10-test2

6 years ago

1.3.10-test

6 years ago

1.3.9

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago