Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ser888gio committed Oct 22, 2024
1 parent 2289f7a commit 698d341
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 1 addition & 6 deletions packages/design-system/src/icons/ErrorIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ export function ErrorIcon(
props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 18 18"
fill="none"
{...props}
>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" {...props}>
{props.children}
<path
fill="currentColor"
Expand Down
10 changes: 5 additions & 5 deletions packages/design-system/src/ui/input/inputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Field } from "./field";
import { Input } from "./input";
import { Label } from "./label";
import { twMerge } from "tailwind-merge";
import { ErrorIcon } from "@repo/design-system/demo";

/*
We choose what Input field properties we allow to be passed to the Input component
Expand Down Expand Up @@ -64,10 +63,11 @@ const InputField = forwardRef<React.ElementRef<typeof Input>, Props>(
</Label>
)}
{hasError && (
<Description state="error">
{`Fix the ${label?.toLowerCase()}`}
<ErrorIcon />
</Description>
<>
<Description state="error">
{`Fix the ${label?.toLowerCase()}`}
</Description>
</>
)}
</Field>
);
Expand Down

0 comments on commit 698d341

Please sign in to comment.