Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ส่วนข้อความขึ้นต้น Task List
const changeHead = (boardName: string, changeDate: string) => ([
{
"type": "text",
"text": `ข้อมูล Change ของ ${boardName} ณ.วันที่ ${changeDate}`,
"size": "xs",
"color": "#8C8C8C",
},
])
// ส่วน Carousel
const memberMain = (memberItems: any) => ([{
"type": "flex",
"altText": "Member List",
"contents": {
"type": "carousel",
"contents": memberItems,
},
}])
// ส่วน Main Bubble
const memberItem = (name: string, shortName: string, taskList: any) => ({
"type": "bubble",
"size": "giga",
"hero": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": `${name}`,
"color": "#ffffff",
"weight": "bold",
"offsetStart": "47px",
"offsetTop": "7px",
},
{
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": `${shortName}`,
},
],
"position": "absolute",
"backgroundColor": "#eeeeee",
"cornerRadius": "xxl",
"paddingAll": "7px",
"offsetTop": "10px",
"offsetStart": "10px",
},
],
"backgroundColor": "#007AC0",
"paddingAll": "12px",
"paddingBottom": "26px",
},
"body": {
"type": "box",
"layout": "vertical",
"contents": taskList,
"spacing": "md",
"paddingAll": "12px",
},
"styles": {
"footer": {
"separator": false,
},
},
})
// ส่วน Box รายละเอียด Change
const taskItem = (action: string, description: any, actionDate: string) => (
{
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": `${action}`,
"size": "md",
"wrap": true,
"weight": "bold",
},
{
"type": "box",
"layout": "vertical",
"offsetStart": "20px",
"contents": description,
},
{
"type": "text",
"text": `${actionDate}`,
"size": "xs",
"color": "#8C8C8C",
},
{
"type": "separator",
"margin": "md",
"color": "#007AC0",
},
],
"flex": 1,
}
)
const taskDetail = (detail: string) => (
{
"type": "text",
"text": `${detail}`,
"size": "xs",
"color": "#8C8C8C",
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment