apeman-react-chat

2.0.2 • Public • Published

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

Name Type Default Description
text string null
align enum 'left'
info array string null

ApChatStyle

Props

Name Type Default Description
style object {}
highlightColor string ApStyle.DEFAULT_HIGHLIGHT_COLOR
backgroundColor ApStyle.DEFAULT_BACKGROUND_COLOR

ApChat

Props

Name Type Default Description

License

This software is released under the MIT License.

Links

Package Sidebar

Install

npm i apeman-react-chat

Weekly Downloads

3

Version

2.0.2

License

MIT

Last publish

Collaborators

  • okunishinishi