Skip to content

Instantly share code, notes, and snippets.

@dhimasanb
Created June 25, 2019 16:28
Show Gist options
  • Save dhimasanb/7e8d80e75b21518c780a3fe045f6f02e to your computer and use it in GitHub Desktop.
Save dhimasanb/7e8d80e75b21518c780a3fe045f6f02e to your computer and use it in GitHub Desktop.
import React from "react";
import { Table } from "antd";
import { convertToRupiah } from "../../../../../utils/helpers";
import column from "./column";
const amountLeftTable = ({ amountLeft }) => {
return (
<Table
showHeader={false}
pagination={false}
dataSource={[
{
key: amountLeft,
no: "Amount Left",
rupiah: convertToRupiah(amountLeft)
}
]}
columns={[
column("No", "no", 200, no => (
<span className="amount-left">{no}</span>
)),
column("Rupiah", "rupiah", 100, rupiah => (
<span className="amount-left">{rupiah}</span>
))
]}
/>
);
};
export default amountLeftTable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment