Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ส่วน Carousel
const boardMain = (boardItems: any) => ([{
"type": "flex",
"altText": "My Board",
"contents": {
"type": "carousel",
"contents": boardItems,
},
}])
// ส่วน Bubble
const boardItem = (id: string, name: string, lastDate: string) => ({
"type": "bubble",
"size": "micro",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": `${name}`,
"color": "#ffffff",
"align": "start",
"size": "sm",
"weight": "bold",
"gravity": "center",
},
],
"backgroundColor": "#007AC0",
"paddingTop": "19px",
"paddingAll": "12px",
"paddingBottom": "16px",
},
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "Last Activity",
"size": "sm",
"color": "#666666",
},
{
"type": "text",
"text": `${lastDate}`,
"size": "xs",
"color": "#666666",
},
],
"spacing": "md",
"paddingAll": "12px",
},
"footer": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "button",
"action": {
"type": "datetimepicker",
"label": "เลือกวันที่",
"data": `action=customDate&id=${id}`,
"mode": "date",
},
"style": "primary",
"height": "sm",
"margin": "sm",
},
],
},
"styles": {
"footer": {
"separator": false,
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment