[ENG-550] Fix checkIcon error (#763)

Fix checkIcon
This commit is contained in:
nikec 2023-04-26 16:22:22 +02:00 committed by GitHub
parent 0a252eb34b
commit 41f5a7c315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ const topBarButtonStyle = cva(
);
export default forwardRef<HTMLButtonElement, TopBarButtonProps>(
({ active, rounding, className, ...props }, ref) => {
({ active, rounding, className, checkIcon, ...props }, ref) => {
return (
<Button
{...props}
@ -44,7 +44,7 @@ export default forwardRef<HTMLButtonElement, TopBarButtonProps>(
className={topBarButtonStyle({ active, rounding, className })}
>
{props.children}
{props.checkIcon && active && (
{checkIcon && active && (
<Check className="absolute right-2 m-0.5 h-5 w-5 text-ink-dull" />
)}
</Button>