Created
February 1, 2021 18:05
-
-
Save PamornT/c1f8d38b19cb2101146a6dad7b91c7f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ส่วน 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