changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export type ButtonVariant = 'primary' | 'outline' | 'error' | 'outline-light';
|
||||
export type ButtonVariant = 'primary' | 'outline' | 'error' | 'outline-light' | 'success';
|
||||
export type ButtonSize = 'sm' | 'md' | 'lg';
|
||||
|
||||
export interface ButtonClassesProps {
|
||||
@@ -11,19 +11,20 @@ export interface ButtonClassesProps {
|
||||
}
|
||||
|
||||
export function buttonClasses({ variant = 'primary', size = 'md', className }: ButtonClassesProps = {}) {
|
||||
const baseClasses = 'inline-flex items-center justify-center gap-2 whitespace-nowrap transition-colors';
|
||||
const baseClasses = 'inline-flex items-center justify-center gap-2 whitespace-nowrap transition-colors font-bold uppercase tracking-wider rounded-md';
|
||||
|
||||
const variantClasses = {
|
||||
primary: 'btn btn-primary text-white font-bold',
|
||||
outline: 'btn bg-white/10 text-white border border-white/20 hover:bg-white/20 font-bold',
|
||||
'outline-light': 'btn bg-white text-primary border border-border hover:bg-slate-50 font-bold',
|
||||
error: 'btn btn-error text-white font-bold',
|
||||
primary: 'bg-primary text-white hover:bg-primary/90 border-2 border-primary',
|
||||
outline: 'bg-transparent text-primary border-2 border-primary hover:bg-primary/5',
|
||||
'outline-light': 'bg-transparent text-white border-2 border-white hover:bg-white/10',
|
||||
error: 'bg-red-600 text-white hover:bg-red-700 border-2 border-red-600',
|
||||
success: 'bg-green-600 text-white hover:bg-green-700 border-2 border-green-600',
|
||||
};
|
||||
|
||||
const sizeClasses = {
|
||||
sm: 'btn-sm text-sm',
|
||||
md: '', // default DaisyUI btn size
|
||||
lg: 'btn-lg text-lg',
|
||||
sm: 'px-6 py-2.5 text-xs',
|
||||
md: 'px-8 py-3.5 text-sm',
|
||||
lg: 'px-10 py-5 text-base',
|
||||
};
|
||||
|
||||
return cn(
|
||||
|
||||
Reference in New Issue
Block a user