icon-wrapper.tsx 577 B

1234567891011121314151617181920212223
  1. import classNames from 'classnames';
  2. import React from 'react';
  3. interface IconWrapperProps {
  4. children: React.ReactNode;
  5. className?: string;
  6. }
  7. // Icon wrapper, with background color and hover color. same width and height
  8. const IconWrapper: React.FC<IconWrapperProps> = ({ children, className }) => {
  9. return (
  10. <div
  11. className={classNames(
  12. 'flex justify-center items-center w-8 h-8 rounded-full dark:bg-zinc-700 hover:bg-stone-200 dark:hover:bg-zinc-900',
  13. className,
  14. )}
  15. >
  16. {children}
  17. </div>
  18. );
  19. };
  20. export default IconWrapper;