UNPKG

jsx-slack

Version:

Build JSON object for Slack Block Kit surfaces from JSX

55 lines (54 loc) 1.95 kB
import { JSXSlack } from '../../jsx'; import { ConfirmableProps } from '../composition/Confirm'; import { ActionProps } from './utils'; export interface OverflowItemProps { children: JSXSlack.ChildElements; /** * An external URL to load when clicked menu item. * * You still have to send an acknowledge response for Slack's event callback * even if setting URL to menu item. */ url?: string; /** * A string value up to 75 characters, for sending to Slack App along with the * interaction payload when clicked menu item. */ value?: string; } export interface OverflowProps extends ActionProps, ConfirmableProps { children: JSXSlack.ChildNodes; } /** * Define menu item for the overflow menu provided by `<Overflow>`. * * You should set the plain-text label for the menu item in its children. * * @return The JSON of the composition object for option suited to overflow menu */ export declare const OverflowItem: import("../../jsx-internals").BuiltInComponent<OverflowItemProps>; /** * The interactive component for * [the `overflow` element](https://api.slack.com/reference/block-kit/block-elements#overflow). * * It provides an overflow menu button displayed as "...". User can access to * some menu items defined by `<OverflowItem>` in children by click the button. * * `<Overflow>` must contain 1 to 5 `<OverflowItem>` component(s). * * @example * ```jsx * <Blocks> * <Actions> * <Overflow actionId="overflow_menu"> * <OverflowItem value="share">Share</OverflowItem> * <OverflowItem value="reply">Reply message</OverflowItem> * <OverflowItem value="open" url="https://example.com/">Open in browser</OverflowItem> * </Overflow> * </Actions> * </Blocks> * ``` * * @return The partial JSON of a block element for overflow menu */ export declare const Overflow: import("../../jsx-internals").BuiltInComponent<OverflowProps>;