ic
This commit is contained in:
19
dist/Button/Button.js
vendored
Normal file
19
dist/Button/Button.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
|
||||
export const Button = ({ children, variant = 'primary', size = 'md', disabled = false, onClick, className = '' }) => {
|
||||
const baseClasses = 'inline-flex items-center justify-center font-medium rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2';
|
||||
const variants = {
|
||||
primary: 'bg-maya-primary text-white hover:bg-blue-700 focus:ring-blue-500',
|
||||
secondary: 'bg-maya-secondary text-white hover:bg-slate-600 focus:ring-slate-500',
|
||||
success: 'bg-maya-success text-white hover:bg-emerald-700 focus:ring-emerald-500',
|
||||
danger: 'bg-maya-danger text-white hover:bg-red-700 focus:ring-red-500'
|
||||
};
|
||||
const sizes = {
|
||||
sm: 'px-3 py-1.5 text-sm',
|
||||
md: 'px-4 py-2 text-base',
|
||||
lg: 'px-6 py-3 text-lg'
|
||||
};
|
||||
return (_jsx("button", { className: `${baseClasses} ${variants[variant]} ${sizes[size]} ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className}`, onClick: onClick, disabled: disabled, children: children }));
|
||||
};
|
||||
|
||||
export default Button;
|
||||
Reference in New Issue
Block a user