Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let Button = ({children, shape, color, hoverColor}) => {
  2.     return <svg className="button" width="100%" height="100%" viewBox="0 0 100 100">
  3.         <circle className="shape" cx="50%" cy="50%" r="50%" fill={color} />
  4.         <style>{`
  5.             .button > .shape {
  6.                 transition: fill 0.4s
  7.             }
  8.  
  9.             .button:hover > .shape {
  10.                 fill: ${hoverColor}
  11.             }
  12.         `}</style>
  13.         <g transform="matrix(0.6 0 0 0.6 20 20)">
  14.             {children}
  15.         </g>
  16.     </svg>;
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement