(function Button(
}: ButtonProps,
ref,
) {
+ const classes = useMemo(
+ () =>
+ classnames(
+ className,
+ 'outline-none pointer-events-auto',
+ 'border border-transparent focus-visible:border-blue-300',
+ 'rounded-md flex items-center',
+ colorStyles[color || 'default'],
+ justify === 'start' && 'justify-start',
+ justify === 'center' && 'justify-center',
+ size === 'md' && 'h-9 px-3',
+ size === 'sm' && 'h-7 px-2.5 text-sm',
+ ),
+ [color, size, justify, className],
+ );
+
if (typeof to === 'string') {
return (
-
+
{children}
{forDropdown &&
}
);
} else {
return (
-