reblock
Version:
Build interactive Slack surfaces with React
27 lines (26 loc) • 1.11 kB
TypeScript
import type { types as Slack } from '@slack/bolt'
import type { Instance, TextInstance } from '../renderer'
export type BlockElement =
| Slack.SectionBlockAccessory
| Slack.InputBlockElement
| Slack.ActionsBlockElement
| Slack.ContextBlockElement
export declare function jsxToBlockElement(
jsx: Instance | TextInstance
): BlockElement
export declare function blockElementIsSectionAccessory(
element: BlockElement
): element is Slack.SectionBlockAccessory
/** The JSX tag names which correspond to block elements an input block allows */
export declare const inputBlockElementTagNames: string[]
export declare function blockElementIsInputBlockElement(
element: BlockElement
): element is Slack.InputBlockElement
/** The JSX tag names which correspond to block elements an actions block allows */
export declare const actionsBlockElementTagNames: string[]
export declare function blockElementIsActionsBlockElement(
element: BlockElement
): element is Slack.ActionsBlockElement
export declare function blockElementIsContextBlockElement(
element: BlockElement
): element is Slack.ContextBlockElement