Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let Button = ({children, shape, color, hoverColor}) => {
- return <svg className="button" width="100%" height="100%" viewBox="0 0 100 100">
- <circle className="shape" cx="50%" cy="50%" r="50%" fill={color} />
- <style>{`
- .button > .shape {
- transition: fill 0.4s
- }
- .button:hover > .shape {
- fill: ${hoverColor}
- }
- `}</style>
- <g transform="matrix(0.6 0 0 0.6 20 20)">
- {children}
- </g>
- </svg>;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement