@@ -6,6 +6,7 @@ import ModalWrapper from "@/components/ModalWrapper";
6
6
import EditVariableModal from "./EditVariableModal" ;
7
7
import { titleCase } from "text-case" ;
8
8
import truncate from "truncate" ;
9
+ import { Trash } from "@phosphor-icons/react" ;
9
10
10
11
/**
11
12
* A row component for displaying a system prompt variable
@@ -63,40 +64,40 @@ export default function VariableRow({ variable, onRefresh }) {
63
64
< >
64
65
< tr
65
66
ref = { rowRef }
66
- className = "bg-transparent text-white text-opacity-80 text-sm font-medium"
67
+ className = "bg-transparent text-white text-opacity-80 text-xs font-medium border-b border-white/10 h-10 "
67
68
>
68
- < th scope = "row" className = "px-6 py-4 whitespace-nowrap" >
69
+ < th scope = "row" className = "px-4 py-2 whitespace-nowrap" >
69
70
{ variable . key }
70
71
</ th >
71
- < td className = "px-6 py-4 " >
72
+ < td className = "px-4 py-2 " >
72
73
{ typeof variable . value === "function"
73
74
? variable . value ( )
74
75
: truncate ( variable . value , 50 ) }
75
76
</ td >
76
- < td className = "px-6 py-4 " >
77
+ < td className = "px-4 py-2 " >
77
78
{ truncate ( variable . description || "-" , 50 ) }
78
79
</ td >
79
- < td className = "px-6 py-4 " >
80
+ < td className = "px-4 py-2 " >
80
81
< span
81
82
className = { `rounded-full ${ colorTheme . bg } px-2 py-0.5 text-xs leading-5 font-semibold ${ colorTheme . text } shadow-sm` }
82
83
>
83
84
{ titleCase ( variable . type ) }
84
85
</ span >
85
86
</ td >
86
- < td className = "px-6 py-4 flex items-center justify-end gap-x-6 " >
87
+ < td className = "px-4 py-2 flex items-center justify-end gap-x-4 " >
87
88
{ variable . type === "static" && (
88
89
< >
89
90
< button
90
91
onClick = { openModal }
91
- className = "text-sm font-medium text-white/80 light:text-black/80 rounded-lg hover:text-white hover:light:text-gray-500 px-2 py-1 hover:bg-white hover:bg-opacity-10"
92
+ className = "text-xs font-medium text-white/80 light:text-black/80 rounded-lg hover:text-white hover:light:text-gray-500 px-2 py-1 hover:bg-white hover:bg-opacity-10"
92
93
>
93
94
Edit
94
95
</ button >
95
96
< button
96
97
onClick = { handleDelete }
97
- className = "text-sm font-medium text-white/80 light:text-black/80 hover:light:text-red-500 hover:text-red-300 rounded-lg px-2 py-1 hover:bg-white hover:light:bg-red-50 hover:bg-opacity-10"
98
+ className = "text-xs font-medium text-white/80 light:text-black/80 hover:light:text-red-500 hover:text-red-300 rounded-lg px-2 py-1 hover:bg-white hover:light:bg-red-50 hover:bg-opacity-10"
98
99
>
99
- Delete
100
+ < Trash className = "h-4 w-4" />
100
101
</ button >
101
102
</ >
102
103
) }
0 commit comments