除了默认的 3 之外,我正在尝试为松弛按钮设置其他样式:
- primary (green)
- danger (red)
- default (grey)
Run Code Online (Sandbox Code Playgroud)
例如,我想为按钮设置其他颜色orange。
我知道可以通过指定十六进制代码来设置附件的自定义颜色。
有没有办法为松弛按钮指定自定义颜色?
这是我尝试过的:
{
"text": "Please rate this trip.",
"attachments": [
{
"callback_id": "rate_trip",
"color": "#3AA3E3",
"attachment_type": "default",
"actions": [
{
"name": "yes",
"text": "yes :thumbsup:",
"type": "button",
"value": "yes",
"style": "primary"
},
{
"name": "no",
"text": "no :thumbsdown:",
"type": "button",
"value": "no",
"style": "danger"
},
// I'd like to make the style for this to be orange but it defaults to grey.
{
"name": "maybe",
"text": "maybe :neutral_face:",
"type": "button",
"value": "maybe",
"style": "#FFA500",
}
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7446 次 |
| 最近记录: |