import { Container } from '@dynshift/layr';
import type { ReactNode } from 'react';
interface ButtonProps {
variant: 'primary' | 'secondary';
children: ReactNode;
onClick?: () => void;
}
const Button: React.FC<ButtonProps> = ({ variant, children, onClick }) => {
const isPrimary = variant === 'primary';
return (
<Container
padding={{ horizontal: 24, vertical: 12 }}
decoration={{
color: isPrimary ? '#eb1660' : '#ffffff',
borderRadius: 8,
border: isPrimary ? undefined : {
top: { width: 1, color: '#e5e7eb' },
bottom: { width: 1, color: '#e5e7eb' },
left: { width: 1, color: '#e5e7eb' },
right: { width: 1, color: '#e5e7eb' },
},
}}
cursor="pointer"
onClick={onClick}
>
<span style={{ color: isPrimary ? '#ffffff' : '#1f2937' }}>
{children}
</span>
</Container>
);
};