2.1.0 • Published 10 months ago

@okitan/ink-slack v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

ink-slack

render Slack blocks into console

Install

$ npm install @okitan/ink-slack ink react

Usage

import { Slack } from "@okitan/ink-slack";
import { 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)
*/