import React from "react"; import "../FulFillCardVer1.scss"; type FulFillCardVer1Props = { logofulfill?: string; text1?: string; text2?: string; items?: { image?: string; badge?: number; name?: string; sku?: string; type?: string; priceAndQuantity?: string; totalPrice?: string; }[]; buttonText?: string; onClick?: (...args: any[]) => any; }; type items = { image?: string; badge?: number; name?: string; sku?: string; type?: string; priceAndQuantity?: string; totalPrice?: string; }; const FulFillCardVer1: React.SFC = ({ logofulfill, buttonText, items, onClick, text1, text2 }: FulFillCardVer1Props) => { return (
true

{text1}

{text2}
{items.map((data: items) => ( <>
{data.badge}
true
{data.name}
{data.sku}
{data.type}
{data.priceAndQuantity}
{data.totalPrice}
))}
{buttonText}
); }; FulFillCardVer1.defaultProps = { logofulfill: "https://uploads-ssl.webflow.com/5bbed931f8149f332875c562/5bbf0c769fc0b60f6851bfba_image.svg", text1: "Unfulfilled", text2: "QUANTITY TO FULFILL", items: [ { image: "https://uploads-ssl.webflow.com/5bbed931f8149f332875c562/5bbf02acbd08906c00233766_Printer_small.jpg", badge: 1, name: "Faxtex Product Sample", sku: "SKU: 4827521", type: "M / Blue", priceAndQuantity: "110₫ × 1", totalPrice: "110₫" }, { image: "https://cdn.shopify.com/s/files/1/0053/4508/3490/products/Photocamera_small.jpg?v=1538713910", badge: 10, name: "Donkix Product Sample", type: "M / Red / 1 Year", priceAndQuantity: "60₫ × 2", totalPrice: "120₫" } ], buttonText: "Mask As Fulfill", onClick: (event: any) => { // eslint-disable-next-line no-console console.log("You have clicked me!", event.target); } }; export default FulFillCardVer1;