0.1.0 • Published 10 years ago

react-auto-kana v0.1.0

Weekly downloads
16
License
ISC
Repository
github
Last release
10 years ago

React Auto Kana

Circle CI

Japanese React Kana Input Component

Demo

Live Demo

Installation

npm install -S react-auto-kana

Usage Example

var React = require("react")
var AutoKana = require("react-auto-kana")

var Example = React.createClass({
  getInitialState(){
    return {
      kana : ""
    }
  },
  onUpdateKana(data){
    this.setState({
      kana : data.kana
    })
    //this.props.onChange(this.state)
  },
  onChange(e){
    this.setState({
      kana : e.target.value
    })
  },
  render(){
    return (
      <div>
        <div>
          <AutoKana onUpdate={this.onUpdateKana} />
          <input name="kana" value={this.state.kana} onChange={this.onChange} />
        </div>
      </div>
    )
  }
})
module.exports = Example

props

  • onUpdate
    • Callback after generated kana
    • data.kana : Generated kana value

If you want get Katakana, you can use japanese module.

Run demo localy

npm run example

Known Issue

Core library is here

  • Invalid behavior when same Kanji is input.
0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago