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

16 lines
287 B
React
Raw Normal View History

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