@@ -35,8 +35,9 @@ const columns: ColumnDef<Script>[] = [
35
35
header : 'Name' ,
36
36
} ,
37
37
{
38
- accessorKey : 'downloadIcon ' ,
38
+ accessorKey : 'download ' ,
39
39
header : 'Download' ,
40
+ cell : ( ) => 'Download Icon' ,
40
41
} ,
41
42
{
42
43
accessorKey : 'type' ,
@@ -46,6 +47,11 @@ const columns: ColumnDef<Script>[] = [
46
47
accessorKey : 'description' ,
47
48
header : 'Description' ,
48
49
} ,
50
+ {
51
+ accessorKey : 'plus' ,
52
+ header : '' ,
53
+ cell : ( ) => 'plus icon' ,
54
+ } ,
49
55
] ;
50
56
51
57
export default function Scripts ( ) {
@@ -56,38 +62,49 @@ export default function Scripts() {
56
62
getCoreRowModel : getCoreRowModel ( ) ,
57
63
} ) ;
58
64
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
+ </ >
92
109
) ;
93
110
}
0 commit comments