UNPKG

fox-block-builder

Version:

Maintainable code for loop slack-block-kit-like modal builder

48 lines (47 loc) 2.89 kB
import { DividerBuilder, DividerParams } from './divider'; import { HeaderBuilder, HeaderParams } from './header'; import { InputBuilder, InputParams } from './input'; import { SectionBuilder, SectionParams } from './section'; export type { DividerBuilder, DividerParams, HeaderBuilder, HeaderParams, InputBuilder, InputParams, SectionBuilder, SectionParams, }; /** * Functions here do not use arrow functions stored in variables for IDE color compatibility. */ /** * @param {Object} [config] Parameters passed to the constructor. * @param {string} [config.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process. * * {@link https://api.slack.com/reference/block-kit/blocks#divider|View in Slack API Documentation} */ export declare function Divider(params?: DividerParams): DividerBuilder; /** * @param {Object} [config] Parameters passed to the constructor. * @param {string} [config.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process. * @param {string} [config.text] Sets the text to be displayed in the header block. * * {@link https://api.slack.com/reference/block-kit/blocks#header|View in Slack API Documentation} */ export declare function Header(params?: HeaderParams): HeaderBuilder; /** * @param {Object} [config] Parameters passed to the constructor. * @param {string} [config.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process. * @param {string} [config.label] Sets the label to be displayed above the input. * @param {string} [config.hint] Sets the hint to be displayed under the input. * * {@link https://api.slack.com/reference/block-kit/blocks#input|View in Slack API Documentation} */ export declare function Input(params?: InputParams): InputBuilder; /** * @param {Object} [config] Parameters passed to the constructor. * @param {string} [config.blockId] Sets a string to be an identifier for the block, that will be available in interaction payloadsSets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process. * @param {string} [config.text] Sets the text to be displayed in the section block. * * {@link https://api.slack.com/reference/block-kit/blocks#section|View in Slack API Documentation} */ export declare function Section(params?: SectionParams): SectionBuilder; declare const blocks: { Divider: typeof Divider; Header: typeof Header; Input: typeof Input; Section: typeof Section; }; export { blocks as Blocks };