This commit is contained in:
Rogelio
2025-10-23 04:36:37 +00:00
commit 9cf2a7f223
1334 changed files with 525004 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
import React from 'react';
export interface ButtonProps {
children: React.ReactNode;
variant?: 'primary' | 'secondary' | 'success' | 'danger';
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
onClick?: () => void;
className?: string;
}
export const Button: React.FC<ButtonProps> = ({
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 (
<button
className={`${baseClasses} ${variants[variant]} ${sizes[size]} ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className}`}
onClick={onClick}
disabled={disabled}
>
{children}
</button>
);
};
export default Button;

View File

@@ -0,0 +1,2 @@
export { default } from './Button';
export type { ButtonProps } from './Button';

View File

@@ -0,0 +1,28 @@
import React from 'react';
export interface CardProps {
children: React.ReactNode;
className?: string;
padding?: 'none' | 'sm' | 'md' | 'lg';
}
export const Card: React.FC<CardProps> = ({
children,
className = '',
padding = 'md'
}) => {
const paddingClasses = {
none: '',
sm: 'p-3',
md: 'p-6',
lg: 'p-8'
};
return (
<div className={`bg-white rounded-xl shadow-lg border border-gray-200 ${paddingClasses[padding]} ${className}`}>
{children}
</div>
);
};
export default Card;

View File

@@ -0,0 +1,2 @@
export { default } from './Card';
export type { CardProps } from './Card';

4
src/components/index.ts Normal file
View File

@@ -0,0 +1,4 @@
export { default as Button } from './Button';
export { default as Card } from './Card';
export type { ButtonProps } from './Button';
export type { CardProps } from './Card';

3
src/styles/globals.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;