Skip to content

Commit

Permalink
🤷 SImplify field counter styles due to design (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClumsyVlad authored Mar 19, 2024
1 parent bff35fa commit 779f174
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/components/ui/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,16 @@ const FormMessage = forwardRef<
FormMessage.displayName = "FormMessage";

interface FormCounterProps
extends Pick<HTMLAttributes<HTMLSpanElement>, "className"> {
extends Pick<HTMLAttributes<HTMLParagraphElement>, "className"> {
current: number;
limit: number;
}

const FormCounter = ({ current, limit, className }: FormCounterProps) => {
return (
<span
className={cn(
"!-mb-3 !mt-0 ml-auto mr-6 block w-fit -translate-y-1/2 rounded bg-background px-1 text-xs leading-none text-primary/40",
className,
)}
>
<p className={cn("!mt-0 ml-auto mr-4 w-fit text-xs opacity-60", className)}>
{current}/{limit}
</span>
</p>
);
};
FormCounter.displayName = "FormCounter";
Expand Down

0 comments on commit 779f174

Please sign in to comment.