const message = (
<Message>
<SectionBlock accessory={<ButtonElement actionId="doAThing">Go!</ButtonElement>}>
<Text type="plaintext" emoji={true}>section text :sadkeanu:</Text>
</SectionBlock>
<DividerBlock />
<SectionBlock blockId="section1">
<Text type="mrkdwn">
section ```code```
</Text>
</SectionBlock>
</Message>
);
const json = SlackRenderer.render(message);
{
"response_type": "ephemeral",
"blocks": [
{
"type": "section",
"text": {
"text": {
"type": "plaintext",
"emoji": true,
"verbatim": false,
"text": "section text :sadkeanu:"
}
}
},
{ "type": "divider" },
{
"type": "section",
"text": {
"text": {
"type": "mrkdwn",
"emoji": false,
"verbatim": false,
"text": "section ```code```"
}
},
"block_id": "section1"
}
]
}