Skip to content

Commit d23c210

Browse files
committed
fix: refine search modal styling and list component
1 parent dfa2a9f commit d23c210

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

packages/app/src/components/dialog-select-file.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ export function DialogSelectFile() {
134134
})
135135

136136
return (
137-
<Dialog title="Search">
137+
<Dialog class="pt-3 pb-0">
138138
<List
139-
search={{ placeholder: "Search files and commands", autofocus: true, hideIcon: true, class: "px-3" }}
139+
search={{ placeholder: "Search files and commands", autofocus: true, hideIcon: true, class: "pl-3 pr-2 !mb-0" }}
140140
emptyMessage="No results found"
141141
items={items}
142142
key={(item) => item.id}
143143
filterKeys={["title", "description", "category"]}
144-
groupBy={(item) => (grouped() ? item.category : "")}
144+
groupBy={(item) => item.category}
145145
onMove={handleMove}
146146
onSelect={handleSelect}
147147
>

packages/ui/src/components/list.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@
5656
width: 20px;
5757
height: 20px;
5858
background-color: transparent;
59+
opacity: 0.5;
60+
transition: opacity 0.15s ease;
5961

6062
&:hover:not(:disabled),
6163
&:focus:not(:disabled),
6264
&:active:not(:disabled) {
6365
background-color: transparent;
66+
opacity: 0.7;
6467
}
6568

6669
&:hover:not(:disabled) [data-slot="icon-svg"] {
@@ -125,18 +128,22 @@
125128
display: flex;
126129
flex-direction: column;
127130

131+
&:last-child {
132+
padding-bottom: 12px;
133+
}
134+
128135
[data-slot="list-header"] {
129136
display: flex;
130137
z-index: 10;
131-
padding: 0 12px 8px 8px;
138+
padding: 8px 12px 8px 12px;
132139
justify-content: space-between;
133140
align-items: center;
134141
align-self: stretch;
135142
background: var(--surface-raised-stronger-non-alpha);
136143
position: sticky;
137144
top: 0;
138145

139-
color: var(--text-base);
146+
color: var(--text-weak);
140147

141148
/* text-14-medium */
142149
font-family: var(--font-family-sans);

0 commit comments

Comments
 (0)