Icon.tsx 614 B

123456789101112131415161718192021222324
  1. import * as React from 'react';
  2. interface IconProps {
  3. children: React.ReactNode;
  4. className?: string;
  5. // FIX: Add style prop to allow inline styling of the SVG icon.
  6. style?: React.CSSProperties;
  7. }
  8. export const Icon: React.FC<IconProps> = ({ children, className, style }) => {
  9. return (
  10. <svg
  11. xmlns="http://www.w3.org/2000/svg"
  12. className={className || 'h-6 w-6'}
  13. fill="none"
  14. viewBox="0 0 24 24"
  15. stroke="currentColor"
  16. strokeWidth={2}
  17. style={style}
  18. >
  19. {children}
  20. </svg>
  21. );
  22. };