Skip to content

Commit

Permalink
Merge pull request #256 from UTDNebula/fix-search-bar
Browse files Browse the repository at this point in the history
fix searchBar props error
  • Loading branch information
nl32 authored Nov 5, 2024
2 parents 5e63afc + ffd85c5 commit b094044
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/searchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ type SearchBarProps = Omit<ComponentProps<'input'>, 'type'> & {
export const SearchBar = (props: SearchBarProps) => {
const submitButton = props.submitButton;
const submitLogic = props.submitLogic;
const goodProps = {
...props,
submitButton: undefined,
submitLogic: undefined,
};
return (
<div className="relative">
<span className="absolute inset-y-0 flex items-center pl-3">
<SearchIcon />
</span>
<input
{...props}
{...goodProps}
type="text"
className={`h-10 w-full rounded-full border pl-10 ${submitButton ? 'pr-[38px]' : 'pr-3'} focus:outline-none ${props.className}`}
onKeyDown={(e) => {
Expand Down

0 comments on commit b094044

Please sign in to comment.