This commit is contained in:
2026-06-18 14:33:50 +08:00
commit 0e43ccec72
248 changed files with 30329 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { Input, View } from '@tarojs/components'
import Icon from '@/components/ui/Icon'
import './index.scss'
interface SearchBarProps {
placeholder: string
value?: string
onInput?: (value: string) => void
}
export function SearchBar({ placeholder, value = '', onInput }: SearchBarProps) {
return (
<View className='search-bar'>
<Icon name='search' size={14} />
<Input
className='search-bar__input'
value={value}
placeholder={placeholder}
placeholderClass='search-bar__placeholder'
onInput={event => onInput?.(String(event.detail.value))}
/>
</View>
)
}
export default SearchBar