@okitan/ink-slack
v2.2.0
Published
render Slack blocks into console
Downloads
36
Readme
ink-slack
render Slack blocks into console
Install
$ npm install @okitan/ink-slack ink react
Usage
import { Slack } from "@okitan/ink-slack";
import type { KnownBlock } from "@slack/types";
import { render } from "ink";
const blocks: KnownBlock[] = [
{
type: "section",
text: {
type: "mrkdwn",
text: "New Paid Time Off request from <example.com|Fred Enriquez>\n\n<https://example.com|View request>",
},
},
];
render(<Slack>{blocks}</Slack>); /* => outputed
New Paid Time Off request from Fred Enriquez (example.com)
View request (https://example.com)
*/