Part and MC question grid jump to, has a bug on next going to refactor the whole thing

This commit is contained in:
Carlos Mesquita
2024-08-23 21:17:32 +01:00
parent b4b078c8c9
commit f0f38b335f
9 changed files with 339 additions and 114 deletions

View File

@@ -9,6 +9,7 @@ interface Props {
className?: string;
disabled?: boolean;
isLoading?: boolean;
padding?: string;
onClick?: () => void;
type?: "button" | "reset" | "submit";
}
@@ -21,6 +22,7 @@ export default function Button({
className,
children,
type,
padding = "py-4 px-6",
onClick,
}: Props) {
const colorClassNames: {[key in typeof color]: {[key in typeof variant]: string}} = {
@@ -61,7 +63,8 @@ export default function Button({
type={type}
onClick={onClick}
className={clsx(
"py-4 px-6 rounded-full transition ease-in-out duration-300 disabled:cursor-not-allowed cursor-pointer",
"rounded-full transition ease-in-out duration-300 disabled:cursor-not-allowed cursor-pointer",
padding,
colorClassNames[color][variant],
className,
)}