lbry-desktop/src/renderer/component/common/truncated-text.jsx
2018-04-18 00:13:00 -04:00

15 lines
287 B
JavaScript

// @flow
import * as React from 'react';
type Props = {
lines: ?number,
children: React.Node,
};
const TruncatedText = (props: Props) => (
<span className="truncated-text" style={{ WebkitLineClamp: props.lines }}>
{props.children}
</span>
);
export default TruncatedText;