/** @jsx createElementInternal */ import { MrkdwnElement } from '@slack/types'; import { JSXSlack } from '../../jsx'; interface MrkdwnProps { children: JSXSlack.ChildElements; /** * A boolean value whether to bypass HTML-like formatting by jsx-slack. * * If enabled, you can bypass HTML-like formatting, and disable auto escape for * [mrkdwn special chracters](https://api.slack.com/reference/surfaces/formatting#escaping). * The defined string in the content will be set as the `text` field of text * composition object as is. Any JSX tags cannot use in contents. * * It's useful for rendering a raw string that is including * [advanced mrkdwn format for Slack](https://api.slack.com/reference/surfaces/formatting#advanced). * * ```jsx * *
* * {'Hey <@U0123ABCD>, thanks for submitting your report.'} * *
*
* ``` */ raw?: boolean; /** * A boolean value whether to disable automatic parsing for links, channel * names, and mentions by Slack. Will parse if not defined. * * @remarks * **We recommend always use `` in your app.** * * Slack is pointing out it has some possibilities for breaking messages. * _Read "[Why you should consider disabling automatic parsing](https://api.slack.com/reference/surfaces/formatting#why_you_should_consider_disabling_automatic_parsing)" * in the documentation by Slack._ */ verbatim?: boolean; } /** * Generate [the text composition object](https://api.slack.com/reference/block-kit/composition-objects#textthe) * for `mrkdwn` type. * * You should contain the content of the message formatted by HTML-like elements * in its children (except for ``). * * jsx-slack built-in components that allowed HTML-like elements in children * generate an implicit text composition object using `mrkdwn` type with * recommended usage by Slack. You can override it by defining `` as an * only element of supported components. * * --- * * ### Bypass HTML-like formatting * * HTML-like formatting by jsx-slack is a comfortable way to define Slack Block * Kit surfaces with familiar syntaxes, but auto-escape for * [mrkdwn special chracters](https://api.slack.com/reference/surfaces/formatting#escaping) * may interfere with the completed mrkdwn text. * * You can use `` if you want to use the raw mrkdwn string as is. It * bypasses HTML-like formatting so you cannot use any JSX tags in contents. * * ```jsx * *
* * {'Hey <@U0123ABCD>, thanks for submitting your report.'} * *
*
* ``` * * --- * * ### Automatic parsing _([not recommended](https://api.slack.com/reference/surfaces/formatting#why_you_should_consider_disabling_automatic_parsing))_ * * jsx-slack has disabled automatic parsing of URL, mention, and channel link by * Slack to prevent breaking explicitly specified formatting. By using * ``, you can instruct to enable parsing them. * * ```jsx * * { * // Section block * } *
* https://example.com/ *
* { * // Section block with fields * } *
* * #general * *
* { * // Context block * } * * @here * Hello! * * { * // Confirm composition object * } * * * *
* ``` * * @remarks * **We recommend never to turn on automatic parsing via * `` in your app.** It's just an escape hatch, and * probably you always must use ``. * * Slack is pointing out it has some possibilities for breaking messages. _Read * "[Why you should consider disabling automatic parsing](https://api.slack.com/reference/surfaces/formatting#why_you_should_consider_disabling_automatic_parsing)" * in the documentation by Slack._ * * @returns The JSON of the composition object for mrkdwn text */ export declare const Mrkdwn: import("../../jsx-internals").BuiltInComponent; export declare const mrkdwn: (text: JSXSlack.ChildElements, defaultOpts?: Omit, force?: boolean) => MrkdwnElement; export declare const mrkdwnForOption: (children: JSXSlack.ChildElements, defaultOpts?: Omit) => { text: MrkdwnElement; description?: MrkdwnElement | undefined; }; export {};