lbry-desktop/src/renderer/component/common/truncated-text.jsx

16 lines
293 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import * as React from 'react';
type Props = {
2018-09-25 01:08:24 +02:00
text: string,
lines: number,
2018-03-26 23:32:43 +02:00
};
2018-04-18 06:03:01 +02:00
const TruncatedText = (props: Props) => (
2018-09-25 01:08:24 +02:00
<span title={props.text} className="truncated-text" style={{ WebkitLineClamp: props.lines }}>
{props.text}
2018-04-18 06:03:01 +02:00
</span>
);
2018-03-26 23:32:43 +02:00
export default TruncatedText;