jsx-slack
Version:
Build JSON object for Slack Block Kit surfaces from JSX
22 lines (21 loc) • 719 B
TypeScript
import { PlainTextElement } from '@slack/types';
import { JSXSlack } from '../../jsx';
import { OptionComposition } from './Option';
export interface OptgroupComposition {
label: PlainTextElement;
options: OptionComposition[];
}
export interface OptgroupProps {
children: JSXSlack.ChildNodes;
/** A plain-text string for the label of the option group. */
label: string;
}
/**
* Generate the composition object, for the group of option items in the static
* select element.
*
* It must contain `<Option>` elements as its children.
*
* @returns The JSON of the composition object for option group
*/
export declare const Optgroup: import("../../jsx-internals").BuiltInComponent<OptgroupProps>;