0.0.1-rc.2 • Published 5 years ago

react-mm-text v0.0.1-rc.2

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

React Myanmar Text - Demo

Build Status

A small react component library to render unicode standard or zawgyi font.


Installation

Using npm

npm install react-mm-text --save

Using yarn

yarn add react-mm-text

Usage

import React from 'react';
import MMText from 'react-mm-text';

class AppExample extends React.Component {

  render() {
    return (
      <div>
        <p>
          <MMText
            text={"သီဟိုဠ်မှ ဉာဏ်ကြီးရှင်သည် အာယုဝဍ်ဎနဆေးညွှန်းစာကို ဇလွန်ဈေးဘေးဗာဒံပင်ထက် အဓိဋ္ဌာန်လျက် ဂဃနဏဖတ်ခဲ့သည်။ ယေဓမ္မာ ဟေတုပ္ပဘဝါ တေသံ ဟေတုံ တထာဂတော အာဟ တေသဉ္စ ယောနိရောဓေါ ဧဝံ ဝါဒီ မဟာသမဏော။"}
            showFont={"unicode"}
            conveter={"rabbit"}
            detector={"knayi"}
          />
        </p>
      </div>
    )
  }

}

API

Props

PropTypeDefaultNote
textString(require)The plain text for render.
showFontStringunicodeThe font type for render. Acceptable values for showFont are unicode and zawgyi. The default is unicode.
conveterStringrabbitThe conveter name to convert. Only one of rabbit and knayi are accept. The default value is rabbit.
detectorStringmyanmar-toolsThe detector name to detect font. Only one of myanmar-tools and knayi are accept. The default value is myanmar-tools.

Todo

  • Add more docs and contributing guide
  • Add example
  • Add more testing details

License

The MIT licensed.