0.1.5 • Published 4 years ago
@epoch_app/slack-markdown-previewer v0.1.5
Usage
import ReactSlackPreviewer from '@epoch_app/slack-markdown-previewer'
Demo
clone repo and run npm start
to view a demo
###Example
<ReactSlackPreviewer
text={"*okok* _italic_ \n * stuff \n * more stuff \n >quote \n \n `code`"}
wrapperStyles={{
backgroundColor: 'teal',
borderRadius: '20px'
}}
displayStyles={{
borderRadius: 'inherit'
}}
slackFrame={true}
profilePhoto={url}
/>
###Props
Prop name | Description |
---|---|
text (required) | string of markdown to preview |
wrapperStyles (optional) | inline style object to style outer component |
displayStyles (optional) | inline style object to style display component |
slackFrame (optional) | bool toggles displaying the slack frame |
profilePhoto (optional) | if using slackFrame mode, this photo url will be displayed as profile image |
name (optional) | username to be displayed in slackframe mode |