UNPKG

@gtalumni-la/react

Version:
73 lines (68 loc) 2.34 kB
import { jsx } from 'react/jsx-runtime'; /** * Do not edit directly, this file was auto-generated. */ const GtColorPrimaryGold = "#B3A369"; // Georgia Tech Primary Gold - Tech Gold const GtColorPrimaryNavy = "#003057"; // Georgia Tech Primary Navy - Tech Navy const GtColorNeutralWhite = "#FFFFFF"; // Pure white const GtSpacing2 = "0.5rem"; // 8px const GtSpacing3 = "0.75rem"; // 12px const GtSpacing4 = "1rem"; // 16px const GtSpacing6 = "1.5rem"; // 24px const GtFontSizeSm = "0.875rem"; // 14px - Small text const GtFontSizeBase = "1rem"; // 16px - Base font size const GtFontSizeLg = "1.125rem"; // 18px - Large text const Button = ({ children, variant = 'primary', size = 'md', disabled = false, type = 'button', ...props }) => { const baseStyles = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'inherit', fontWeight: '500', backgroundColor: 'transparent', borderRadius: '6px', cursor: disabled ? 'not-allowed' : 'pointer', transition: 'all 0.2s ease-in-out', textDecoration: 'none', opacity: disabled ? 0.5 : 1, }; const variantStyles = { primary: { backgroundColor: GtColorPrimaryGold, color: GtColorNeutralWhite, border: 'none', }, secondary: { backgroundColor: GtColorPrimaryNavy, color: GtColorNeutralWhite, border: 'none', }, outline: { backgroundColor: 'transparent', color: GtColorPrimaryGold, border: `2px solid ${GtColorPrimaryGold}`, }, }; const sizeStyles = { sm: { padding: `${GtSpacing2} ${GtSpacing3}`, fontSize: GtFontSizeSm, }, md: { padding: `${GtSpacing3} ${GtSpacing4}`, fontSize: GtFontSizeBase, }, lg: { padding: `${GtSpacing4} ${GtSpacing6}`, fontSize: GtFontSizeLg, }, }; const combinedStyles = { ...baseStyles, ...variantStyles[variant], ...sizeStyles[size], }; return (jsx("button", { style: combinedStyles, disabled: disabled, type: type, ...props, children: children })); }; export { Button }; //# sourceMappingURL=index.esm.js.map