Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit e1fe27d

Browse files
author
Manuel Proß
committed
feat(web): add basic styling, add heading, button and search field
1 parent 9b9933b commit e1fe27d

File tree

1 file changed

+51
-34
lines changed

1 file changed

+51
-34
lines changed

web/src/app/scripts/page.tsx

Lines changed: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ const columns: ColumnDef<Script>[] = [
3535
header: 'Name',
3636
},
3737
{
38-
accessorKey: 'downloadIcon',
38+
accessorKey: 'download',
3939
header: 'Download',
40+
cell: () => 'Download Icon',
4041
},
4142
{
4243
accessorKey: 'type',
@@ -46,6 +47,11 @@ const columns: ColumnDef<Script>[] = [
4647
accessorKey: 'description',
4748
header: 'Description',
4849
},
50+
{
51+
accessorKey: 'plus',
52+
header: '',
53+
cell: () => 'plus icon',
54+
},
4955
];
5056

5157
export default function Scripts() {
@@ -56,38 +62,49 @@ export default function Scripts() {
5662
getCoreRowModel: getCoreRowModel(),
5763
});
5864
return (
59-
<table>
60-
<thead>
61-
{table.getHeaderGroups().map((headerGroup) => {
62-
return (
63-
<tr key={headerGroup.id}>
64-
{headerGroup.headers.map((header) => {
65-
return (
66-
<th id={header.id} key={header.id}>
67-
{' '}
68-
{header.isPlaceholder
69-
? null
70-
: flexRender(header.column.columnDef.header, header.getContext())}
71-
</th>
72-
);
73-
})}
74-
</tr>
75-
);
76-
})}
77-
</thead>
78-
<tbody>
79-
{table.getRowModel().rows.map((row) => {
80-
return (
81-
<tr key={row.id}>
82-
{row.getVisibleCells().map((cell) => {
83-
return (
84-
<td key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</td>
85-
);
86-
})}
87-
</tr>
88-
);
89-
})}
90-
</tbody>
91-
</table>
65+
<>
66+
<div className="flex items-center">
67+
<h1 className="h3">Scripts</h1>
68+
<div className="flex gap-3 mr-0 ml-auto">
69+
<button className="btn">Add New Script</button>
70+
<input type="text" />
71+
</div>
72+
</div>
73+
<table className="border-separate border-spacing-y-[5px]">
74+
<thead className="py-5 bg-green-500 bg-opacity-30">
75+
{table.getHeaderGroups().map((headerGroup) => {
76+
return (
77+
<tr key={headerGroup.id}>
78+
{headerGroup.headers.map((header) => {
79+
return (
80+
<th className="py-2 pl-3 text-left" id={header.id} key={header.id}>
81+
{' '}
82+
{header.isPlaceholder
83+
? null
84+
: flexRender(header.column.columnDef.header, header.getContext())}
85+
</th>
86+
);
87+
})}
88+
</tr>
89+
);
90+
})}
91+
</thead>
92+
<tbody>
93+
{table.getRowModel().rows.map((row) => {
94+
return (
95+
<tr className="odd:bg-gray-500 even:bg-gray-900" key={row.id}>
96+
{row.getVisibleCells().map((cell) => {
97+
return (
98+
<td className="pl-3" key={cell.id}>
99+
{flexRender(cell.column.columnDef.cell, cell.getContext())}
100+
</td>
101+
);
102+
})}
103+
</tr>
104+
);
105+
})}
106+
</tbody>
107+
</table>
108+
</>
92109
);
93110
}

0 commit comments

Comments
 (0)