-
-
Notifications
You must be signed in to change notification settings - Fork 475
Description
- [X ] I have searched the Issues to see if this bug has already been reported
- [X ] I have tested the latest version
Steps to reproduce
import { Footer } from "flowbite-react";
import { Link } from "react-router-dom";
<Footer container>
<div className="w-full text-center">
<div className="w-full justify-between sm:flex sm:items-center sm:justify-between">
<Footer.Brand
as={Link}
to="/"
src="https://flowbite.com/docs/images/logo.svg"
alt="Flowbite Logo"
name="Flowbite"
/>
<Footer.LinkGroup>
<Footer.Link as={Link} to="/about">
About
</Footer.Link>
<Footer.Link as={Link} to="/contact">
Contact
</Footer.Link>
</Footer.LinkGroup>
</div>
<Footer.Divider />
<Footer.Copyright as={Link} to="/" by="Flowbite™" year={2022} />
</div>
</Footer>
Current behavior
When I assign the as prop to the Footer elements, I get below errors
Type '{ as: ForwardRefExoticComponent<LinkProps & RefAttributes>; to: string; by: string; year: number; }' is not assignable to type 'IntrinsicAttributes & CopyrightProps'.
Property 'as' does not exist on type 'IntrinsicAttributes & CopyrightProps'.
Type '{ children: string; as: ForwardRefExoticComponent<LinkProps & RefAttributes>; to: string; }' is not assignable to type 'IntrinsicAttributes & FooterLinkProps'.
Property 'to' does not exist on type 'IntrinsicAttributes & FooterLinkProps'.
Expected behavior
The Footer component should accept the as prop just like the other components do (such as Sidebar, Navbar etc.)
Context
I am trying to use the as prop