You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 regels
701 B

  1. import PropTypes from 'prop-types';
  2. // third-party
  3. import { motion } from 'framer-motion';
  4. // ==============================|| ANIMATION BUTTON ||============================== //
  5. export default function AnimateButton({ children, type = 'scale' }) {
  6. switch (type) {
  7. case 'rotate': // only available in paid version
  8. case 'slide': // only available in paid version
  9. case 'scale': // only available in paid version
  10. default:
  11. return (
  12. <motion.div whileHover={{ scale: 1 }} whileTap={{ scale: 0.9 }}>
  13. {children}
  14. </motion.div>
  15. );
  16. }
  17. }
  18. AnimateButton.propTypes = {
  19. children: PropTypes.node,
  20. type: PropTypes.oneOf(['slide', 'scale', 'rotate'])
  21. };