Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions block-kit/src/blocks/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@ def example01() -> CardBlock:
"""
block = CardBlock(
icon=ImageElement(image_url="https://picsum.photos/36/36", alt_text="Icon"),
title=MarkdownTextObject(text="Lumon Industries"),
subtitle=MarkdownTextObject(text="Committed to work-life balance"),
title=MarkdownTextObject(
text="Lumon Industries",
verbatim=False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: All three mrkdwn objects match the docs now, with the test covering each one.

),
subtitle=MarkdownTextObject(
text="Committed to work-life balance",
verbatim=False,
),
hero_image=ImageElement(
image_url="https://picsum.photos/400/300", alt_text="Sample hero image"
),
body=MarkdownTextObject(text="Please enjoy each card equally."),
body=MarkdownTextObject(
text="Please enjoy each card equally.",
verbatim=False,
),
actions=[
ButtonElement(
text=PlainTextObject(text="Action Button", emoji=False),
Expand Down
3 changes: 3 additions & 0 deletions block-kit/tests/blocks/test_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def test_example01():
"title": {
"type": "mrkdwn",
"text": "Lumon Industries",
"verbatim": False,
},
"subtitle": {
"type": "mrkdwn",
"text": "Committed to work-life balance",
"verbatim": False,
},
"hero_image": {
"type": "image",
Expand All @@ -29,6 +31,7 @@ def test_example01():
"body": {
"type": "mrkdwn",
"text": "Please enjoy each card equally.",
"verbatim": False,
},
"actions": [
{
Expand Down
Loading