Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import React from 'react'; interface BadgesButtonProps { onClick: () => void; position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; } const BadgesButton: React.FC<BadgesButtonProps> = ({ onClick, position }) => { const buttonStyle: React.CSSProperties = { position: 'fixed', [position.split('-')[0]]: '20px', [position.split('-')[1]]: '20px', padding: '10px 20px', backgroundColor: '#007bff', color: '#fff', border: 'none', borderRadius: '5px', cursor: 'pointer', zIndex: 998, }; return ( <button style={buttonStyle} onClick={onClick}> View Achievements </button> ); }; export default React.memo(BadgesButton); |