Skip to content

Commit

Permalink
chore: implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRodrigues10 committed Nov 24, 2023
1 parent ccc1684 commit a179242
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
bold?: boolean;
}

interface ButtonTitleProps {
title: string;
bold?: boolean;
}

export default function Button({
title,
description,
Expand All @@ -15,20 +20,26 @@ export default function Button({
onClick,
customStyle,
bold,
...rest
}: Props) {
return (
<button
{...rest}
onClick={onClick}
type={type}
disabled={disabled}
className={`${
customStyle || ""
} m-auto block rounded-full hover:opacity-75 disabled:bg-gray-400 disabled:opacity-75`}
>
<p className={bold ? "font-ibold font-ibold" : "font-iregular"}>
{title}
</p>
<ButtonTitle title={title} bold={bold} />
<p className="font-iregular">{description}</p>
</button>
);
}

function ButtonTitle({ title, bold }: ButtonTitleProps) {
return (
<p className={bold ? "font-ibold font-ibold" : "font-iregular"}>{title}</p>
);
}

0 comments on commit a179242

Please sign in to comment.