style(StorePage): refactor button element to improve readability and maintainability
fix(StorePage): fix className prop on Button component to correctly apply error styling fix(StorePage): fix className prop on IconComponent to correctly apply loading animation fix(StorePage): fix onClick event on IconComponent to correctly update searchText state
This commit is contained in:
parent
e123b753e7
commit
630fabc328
1 changed files with 8 additions and 7 deletions
|
|
@ -158,16 +158,17 @@ export default function StorePage(): JSX.Element {
|
|||
}}
|
||||
value={inputText}
|
||||
/>
|
||||
<IconComponent
|
||||
name={loading ? "Loader2" : "Search"}
|
||||
<button
|
||||
className="absolute bottom-0 right-4 top-0 my-auto h-6 cursor-pointer stroke-1 text-muted-foreground"
|
||||
onClick={() => {
|
||||
setSearchText(inputText);
|
||||
}}
|
||||
className={
|
||||
"absolute bottom-0 right-4 top-0 my-auto h-6 cursor-pointer stroke-1 text-muted-foreground" +
|
||||
(loading ? " animate-spin" : "")
|
||||
}
|
||||
/>
|
||||
>
|
||||
<IconComponent
|
||||
name={loading ? "Loader2" : "Search"}
|
||||
className={loading ? " animate-spin" : ""}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div className="ml-4 flex w-full gap-2 border-b border-border">
|
||||
<button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue