import React from 'react';
export interface ButtonProps {
/** Button variant - determines visual style */
variant?: 'primary'; // Extensible: | 'secondary' | 'tertiary'
/** Button content/label */
children: React.ReactNode;
/** Click handler */
onClick?: () => void;
/** Disabled state */
disabled?: boolean;
/** Button type attribute */
type?: 'button' | 'submit' | 'reset';
/** Additional CSS classes */
className?: string;
/** Whether to show the arrow icon */
showIcon?: boolean;
}
/**
* Animated Arrow Icon Component
* The horizontal line shrinks from left to right on hover/focus,
* while the chevron shifts right via the gap change.
*/
const ArrowIcon: React.FC = () => (
);
/**
* BDS Button Component
*
* A scalable button component following the XRPL Brand Design System.
* Currently supports the Primary variant with plans for Secondary and Tertiary.
*
* @example
*
*/
export const Button: React.FC = ({
variant = 'primary',
children,
onClick,
disabled = false,
type = 'button',
className = '',
showIcon = true,
}) => {
// Build class names using BEM with bds namespace
const classNames = [
'bds-btn',
`bds-btn--${variant}`,
disabled ? 'bds-btn--disabled' : '',
!showIcon ? 'bds-btn--no-icon' : '',
className,
]
.filter(Boolean)
.join(' ');
return (
);
};
export default Button;