diff --git a/app/components/Button.tsx b/app/components/Button.tsx index 1b374e0..177b042 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -27,24 +27,19 @@ type ButtonProps = { | (JSX.IntrinsicElements["a"] & { href: string }) ); -export function Button({ - variant = "primary", - size = "md", - className, - ...props -}: ButtonProps) { - className = clsx( - variantStyles[variant], - sizeStyles[size], +export function Button(props: ButtonProps) { + const className = clsx( + variantStyles[props.variant ?? "primary"], + sizeStyles[props.size ?? "md"], "cursor-pointer", - className, + props.className, ); return "href" in props && props.href ? ( ) : ( diff --git a/app/components/Callout.tsx b/app/components/Callout.tsx index 3459a9a..f2a3f3e 100644 --- a/app/components/Callout.tsx +++ b/app/components/Callout.tsx @@ -31,25 +31,20 @@ const icons = { ), }; -export default function Callout({ - title, - children, - type = "note", - collapsible = false, -}: { +export default function Callout(props: { title: string; children: JSX.Element; type?: keyof typeof styles; collapsible?: boolean; }) { - const IconComponent = icons[type]; + const IconComponent = icons[props.type || "note"]; return (
- {title} + {props.title}