website refactor
This commit is contained in:
@@ -45,6 +45,7 @@ export interface ButtonProps {
|
||||
shadow?: string;
|
||||
display?: string;
|
||||
center?: boolean;
|
||||
justifyContent?: string;
|
||||
}
|
||||
|
||||
export const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(({
|
||||
@@ -89,6 +90,7 @@ export const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonPr
|
||||
shadow,
|
||||
display,
|
||||
center,
|
||||
justifyContent,
|
||||
}, ref) => {
|
||||
const baseClasses = 'inline-flex items-center justify-center focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 active:opacity-80 uppercase tracking-widest font-bold';
|
||||
const transitionClasses = transition !== false ? 'transition-all duration-150 ease-in-out' : '';
|
||||
@@ -125,6 +127,7 @@ export const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonPr
|
||||
hoverScale ? 'hover:scale-105' : '',
|
||||
display === 'flex' ? 'flex' : '',
|
||||
center ? 'items-center justify-center' : '',
|
||||
justifyContent ? `justify-${justifyContent}` : '',
|
||||
className,
|
||||
].filter(Boolean).join(' ');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user