-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Not strictly an issue of this library but a question about integrating with styled-components.
I have the following piece of code and styled-components is unable to deduce h1
attributes of StyledHeading
. With only as={}
suggested when creating a StyledHeading
tag and any other attributes being any
. Upon checking the typing from my IDE, I see that StyledHeading
has type StyledComponent<PolymorphicForwardRefExoticComponent<P, any>, ...>
.
import styled from 'styled-components'
export const Heading: PolymorphicForwardRefExoticComponent<
HeadingOwnProps,
typeof HeadingDefaultElement
>(...) => {...}
const StyledHeading = styled(Heading).attrs({
forwardedAs: 'h1' // or as: 'h1'
})``
Metadata
Metadata
Assignees
Labels
No labels