Closed Th1nkK1D closed 1 month ago
View Figma
changes: array of given mock data type below
selectedDate: Date | undefined
changes
/politicians/{politician.id}
yarn gen:component
selectedDate
Hst.Variant
const mockChanges = [ { date: new Date("2024-05-27"), type: "in", politician: { id: "มาริษ-เสงี่ยมพงษ์", firstname: "มาริษ", lastname: "เสงี่ยมพงษ์", avatar: "https://placehold.co/128x128", party: { name: "เพื่อไทย", logo: "https://placehold.co/64x64/white/blue?text=PT", color: "blue", }, }, role: "รัฐมนตรีว่าการกระทรวงต่างประเทศ" }, { date: new Date("2024-05-27"), type: "out", politician: { id: "ปานปรีย์-พหิทธานุกร", firstname: "ปานปรีย์", lastname: "พหิทธานุกร", avatar: "https://placehold.co/128x128", party: { name: "เพื่อไทย", logo: "https://placehold.co/64x64/white/blue?text=PT", color: "blue", }, }, role: "รัฐมนตรีว่าการกระทรวงต่างประเทศ" }, { date: new Date("2024-05-27"), type: "in", politician: { id: "สุริยะ-จึงรุ่งเรืองกิจ", firstname: "สุริยะ", lastname: "จึงรุ่งเรืองกิจ", avatar: "https://placehold.co/128x128", party: { name: "เพื่อไทย", logo: "https://placehold.co/64x64/white/blue?text=PT", color: "blue", }, }, role: "รองนายกรัฐมนตรี" }, { date: new Date("2024-05-20"), type: "out", politician: { id: "ปานปรีย์-พหิทธานุกร", firstname: "ปานปรีย์", lastname: "พหิทธานุกร", avatar: "https://placehold.co/128x128", party: { name: "เพื่อไทย", logo: "https://placehold.co/64x64/white/blue?text=PT", color: "blue", }, }, role: "รองนายกรัฐมนตรี" }, ];
View Figma
Suggested props
changes: array of given mock data type below
: represent changes data to be rendered as a list (required)selectedDate: Date | undefined
(default is undefined): date to be highlighted with dark shadeBehavior
changes
props, pagination is out of this component's scope./politicians/{politician.id}
Starting point
yarn gen:component
selectedDate
usingHst.Variant
(see doc)Mock data