0.1.1 • Published 5 years ago

rssr-smart-direction v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

rssr-smart-direction

detect text and set LTR or RTL direction to element

Example

import React from 'react';
import SmartDirection from "rssr-smart-direction";

const MySmartDirection = () => {
    const sampleTextForSmartDirection = ['this is sample LTR text for test smart direction', 'نمونه متن راست چین برای ازمایش چینش هوشمند']

    return (
        <div>
            {
                sampleTextForSmartDirection.map((txt, index) => (
                    <SmartDirection text={txt} key={index}>
                        <div>{txt}</div>
                    </SmartDirection>
                ))
            }
        </div>
    );
};

export default MySmartDirection;
0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

6 years ago