UNPKG

jsx-slack

Version:

Build JSON object for Slack Block Kit surfaces from JSX

41 lines (40 loc) 1.25 kB
import { PlainTextElement } from '@slack/types'; import { JSXSlack } from '../../jsx'; export declare const optionSelectedSymbol: unique symbol; export interface OptionComposition { text: PlainTextElement; value: string; description?: PlainTextElement; readonly [optionSelectedSymbol]?: boolean; } export interface OptionProps { children: JSXSlack.ChildElements; /** * A string for the secondary description label of the option item. * * The description appears next to the item label in small gray text. */ description?: string; /** * A boolean value to indicate an initially selected option. * * `<Select>` component may reflect this state. */ selected?: boolean; /** * A string value to send to Slack App when choose item. * * If not defined, jsx-slack will generate the value string from the label * content. */ value?: string; } /** * Generate the composition object, for the option item in the static select * element. * * You should set the plain-text label in its children. * * @returns The JSON of the composition object for option */ export declare const Option: import("../../jsx-internals").BuiltInComponent<OptionProps>;