Answer the question
In order to leave comments, you need to log in
How to fix "React does not recognize" styled-components error?
Warning (error) text:
React does not recognize the `fullSize` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `fullsize` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
import styled, { css } from 'styled-components'
export const Link = styled.a`
${(p) => p.fullSize && css`
display: flex;
width: 100%;
height: 100%;
align-items: center;
`}
color: inherit;
font-weight: 600;
text-decoration: none;
letter-spacing: 0.6px;
`
import { Link } from './asas'
class MobileMenu extends Component {
...
return (
<Link
fullSize
as={Link}
to={item.href}
onClick={onClose}
>
{i18n.t(item.title)}
</Link>
)
}
Answer the question
In order to leave comments, you need to log in
I don't think it's a solution, but it's not an error
<MenuHead key={index}>
<MenuLink
fullsize=""
as={Link}
to={item.href}
onClick={onClose}
>
{i18n.t(item.title)}
</MenuLink>
</MenuHead>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question