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