Skip to content

Commit

Permalink
Adjusting
Browse files Browse the repository at this point in the history
  • Loading branch information
édouard wautier authored and édouard wautier committed Oct 2, 2023
1 parent 6b73446 commit 77f7dc7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sparkle/src/components/Searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useRef } from "react";
import { Icon } from "@sparkle/components/Icon";
import { classNames } from "@sparkle/lib/utils";

import { MagnifyingGlassStrokeIcon, XCircleIcon } from "..";
import { MagnifyingGlassStrokeIcon, XMarkIcon } from "..";
import { IconButton } from "./IconButton";

export function Searchbar({
Expand Down Expand Up @@ -60,18 +60,16 @@ export function Searchbar({
onKeyDown={onKeyDown}
disabled={disabled}
/>
<div className="s-absolute s-right-0 s-top-0 s-flex s-h-full s-items-center s-pr-1.5">
<div className="s-absolute s-right-0 s-top-0 s-flex s-h-full s-items-center s-pr-3">
{value && onChange ? (
<IconButton
icon={XCircleIcon}
variant="tertiary"
size="md"
icon={XMarkIcon}
variant="secondary"
size="sm"
onClick={clearInputField}
/>
) : (
<div className="s-pr-1">
<Icon visual={MagnifyingGlassStrokeIcon} size="sm" />
</div>
<Icon visual={MagnifyingGlassStrokeIcon} size="sm" />
)}
</div>
</div>
Expand Down

0 comments on commit 77f7dc7

Please sign in to comment.