0.1.5 • Published 26 days ago
slack-blocks-to-jsx v0.1.5
Slack Blocks to JSX
Playground - https://slack-block-to-jsx-playground.vercel.app/
How to use
- Install the Library
- Import the CSS file in your entry point file
import "slack-blocks-to-jsx/dist/style.css"
- Import the component and use it
import { Message } from "slack-blocks-to-jsx"
(optional) import the Block type to define the blocks for better type safety :)
import type { Block } from "slack-blocks-to-jsx"
const blocks: Block[] = [...your slack blocks]
<Message time={new Date()} name="Your Company" logo="https://commons.wikimedia.org/wiki/File:Google_%22G%22_logo.svg" blocks={blocks} />
Note: This library is under development, if you need any functionality and it is not working/available yet in the library please raise an issue here. I will try to fix it asap :).