1.3.10-test4 • Published 8 years ago
react-text-overflow-middle-ellipsis v1.3.10-test4
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-ellipsisUsage
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 TextRender output:
Long L..TextDEMO
TODO
- Support emoji croping.
- The only child element is non-essential.
1.3.10-test4
8 years ago
1.3.10-test3
8 years ago
1.3.10-test2
8 years ago
1.3.10-test
8 years ago
1.3.9
8 years ago
1.3.8
8 years ago
1.3.7
8 years ago
1.3.6
8 years ago
1.3.5
8 years ago
1.3.4
8 years ago
1.3.3
8 years ago
1.3.2
8 years ago
1.3.1
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago