Skip to content

react-icons v5 (required by ui/package.json) is not type compatible with icon prop in components like Alert #1359

Closed
@akshetpandey

Description

@akshetpandey
  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

Sample form https://flowbite-react.com/docs/components/alert#alert-with-icon

import { HiInformationCircle } from "react-icons/hi";
import { Alert } from "flowbite-react";

function Component() {
  return (
    <Alert color="failure" icon={HiInformationCircle}>
      <span className="font-medium">Info alert!</span> Change a few things up and try submitting again.
    </Alert>
  );
}

This will produce a TS error: HiInformationCircle:IconType is not assignable to icon:FC<SVGProps<SVGSVGElement>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions