feat: implement DataTable component with custom styling for dashboard and subscriptions pages

This commit is contained in:
fredy.siswanto 2025-02-26 23:25:05 +07:00
parent 238e69b5e2
commit d273d9ecc6
4 changed files with 34 additions and 1 deletions

View File

@ -18,3 +18,13 @@
html, html,
body { body {
} }
table.dataTable thead > tr {
border-bottom: 2px solid #c2c2c2;
}
table.dataTable tbody > tr > td {
border-left: none !important;
border-right: none !important;
border-bottom: 1px solid #ebebeb;
}

View File

@ -0,0 +1,22 @@
import DT from 'datatables.net-dt'
import DataTable from 'datatables.net-react'
export const TableComponent = () => {
DataTable.use(DT)
return (
<>
<h1>test</h1>
<DataTable
className="cell-border"
data={[]}
columns={[]}
options={{
paging: true,
searching: true,
ordering: true,
info: true,
}}
></DataTable>
</>
)
}

View File

@ -29,6 +29,7 @@ export const ContentsPage = () => {
searching: true, searching: true,
ordering: true, ordering: true,
info: true, info: true,
// scrollY: '50vh',
}} }}
></DataTable> ></DataTable>
</div> </div>

View File

@ -47,7 +47,7 @@ export const SubscriptionsPage = () => {
{SubscribtionOpen && ( {SubscribtionOpen && (
<DataTable <DataTable
className="cell-border" // className="cell-border"
data={SUBSCRIPTIONS} data={SUBSCRIPTIONS}
columns={colTableSubscription} columns={colTableSubscription}
options={{ options={{