Truncate

Easy way how to truncate one line or multiline paragraph, which ends with dots. It's necessary adding class .text-truncate-multiline and another one .text-truncate-multiline-* (* is for options 2-6) for multiline truncate.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed magna molestie urna convallis pretium.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed magna molestie urna convallis pretium. Aenean in venenatis elit. Aliquam venenatis nisi ac purus fermentum faucibus.
import React from 'react';

const Example = () => (
    <div className="row">
        <div className="col-4">
            <div className="text-truncate-line">
                <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span>
            </div>
        </div>
        <div className="col-4">
            <div className="text-truncate-multiline text-truncate-multiline-2">
                <span>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed magna molestie urna convallis
                    pretium.
                </span>
            </div>
        </div>
        <div className="col-4">
            <div className="text-truncate-multiline text-truncate-multiline-3">
                <span>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed magna molestie urna convallis
                    pretium. Aenean in venenatis elit. Aliquam venenatis nisi ac purus fermentum faucibus.
                </span>
            </div>
        </div>
    </div>
);

export default Example;