Skip to content

Commit da1f141

Browse files
committed
feat: enhance SchemaSearch component with new input and button styles, and add Plus icon for better UX
1 parent 08dfcf2 commit da1f141

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const buttonVariants = cva(
2727
xs: 'h-6 rounded-full px-2 text-xs has-[>svg]:px-1.5 gap-1',
2828
sm: 'h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5',
2929
default: 'h-9 px-4 py-2 has-[>svg]:px-3 rounded-full',
30-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
30+
lg: 'h-11 rounded-full px-6 has-[>svg]:px-4 text-md',
3131
icon: 'size-9 rounded-md',
3232
},
3333
},

src/modules/datasets/SchemaSearch.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { datasetSchemaTypeGroups } from '@/config';
22
import { cn } from '@/lib/utils';
33
import { SelectLabel } from '@radix-ui/react-select';
4-
import { ChevronDown, SlidersHorizontal, X } from 'lucide-react';
4+
import { ChevronDown, Plus, SlidersHorizontal, X } from 'lucide-react';
55
import { useState } from 'react';
66
import { Button } from '@/components/ui/button';
77
import { Input } from '@/components/ui/input';
@@ -100,8 +100,11 @@ export function SchemaSearch({
100100
})}
101101
</div>
102102
</div>
103-
<div className="mt-6 mb-6 flex translate-y-1 gap-4">
103+
<div className="mt-6 mb-6 flex translate-y-1 flex-col items-center gap-4 sm:flex-row">
104104
<Input
105+
type="text"
106+
id="schema-path"
107+
autoComplete="off"
105108
value={inputPathValue}
106109
onChange={(e) => setInputPathValue(e.target.value)}
107110
className={cn(
@@ -111,7 +114,7 @@ export function SchemaSearch({
111114
/>
112115

113116
<Select value={selectedType} onValueChange={setSelectedType}>
114-
<SelectTrigger className="bg-muted border-secondary w-full max-w-1/3 rounded-2xl px-4 py-6 text-sm text-white">
117+
<SelectTrigger className="bg-muted border-secondary w-full rounded-2xl px-4 py-6 text-sm text-white sm:max-w-1/3">
115118
<SelectValue placeholder="Select type" />
116119
</SelectTrigger>
117120
<SelectContent className="bg-muted border-secondary overflow-visible p-6">
@@ -137,10 +140,12 @@ export function SchemaSearch({
137140
</SelectContent>
138141
</Select>
139142
<Button
143+
size="lg"
140144
onClick={handleAdd}
141145
disabled={!inputPathValue.trim() || !selectedType}
142146
>
143147
Add filter
148+
<Plus size={20} />
144149
</Button>
145150
</div>
146151
</div>

0 commit comments

Comments
 (0)