2.0.2 • Published 10 years ago

apeman-react-chat v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

apeman-react-chat

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for chat components.

Installation

$ npm install apeman-react-chat --save

Demo

Live demo is hosted on GitHub Pages.

Usage

'use strict'

import React from 'react'
import {ApChat, ApChatItem, ApChatStyle} from 'apeman-react-chat'

const ExampleComponent = React.createClass({
  render () {
    return (
      <div>
        <ApChatStyle />
        <ApChat>
          <ApChatItem text="こんにちは"/>
          <ApChatItem text={
`
 むかしむかし、あるところに、おじいさんとおばあさんが住んでいました。
 おじいさんは山へしばかりに、おばあさんは川へせんたくに行きました。
 おばあさんが川でせんたくをしていると、ドンブラコ、ドンブラコと、大きな桃が流れてきました。
「おや、これは良いおみやげになるわ」
 おばあさんは大きな桃をひろいあげて、家に持ち帰りました。
 そして、おじいさんとおばあさんが桃を食べようと桃を切ってみると、なんと中から元気の良い男の赤ちゃんが飛び出してきました。
`
          }/>
        </ApChat>
      </div>
    )
  }
})

Components

ApChatItem

Props

NameTypeDefaultDescription
textstringnullBalloon text
alignenum'left'Align direction
infoarraystringnullInfo texts

ApChatStyle

Props

NameTypeDefaultDescription
styleobject{}
highlightColorstringApStyle.DEFAULT_HIGHLIGHT_COLOR
backgroundColorApStyle.DEFAULT_BACKGROUND_COLOR

ApChat

Props

NameTypeDefaultDescription

License

This software is released under the MIT License.

Links

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago