0.0.2 • Published 7 years ago

utu-platform-messages v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Platform Messages

Renders mocked version of messaging platforms messages.

Installation

  yarn add utu-platform-messages

Usage

import PlatformMessage from 'platform-messages';

const Render = ({ message }) => (
  <PlatformMessage platform="sms" message={message} />
)

const message = {
  message: "", // text from the message
  botMessage: false, // was this message from a bot or from the user
  rawMessage: {
    /* platform raw message */
  }
};

Testing

$ yarn run test:watch

Storybook

$ yarn run storybook