I. am getting below warning . I don't know where I am doing wrong .I am using style component in my demo application.
react_devtools_backend.js:4061 Warning: Received `false` for a non-boolean attribute `border`.
If you want to write it to the DOM, pass a string instead: border="false" or border={value.toString()}.
If you used to conditionally omit it with border={condition && value}, pass border={condition ? value : undefined} instead.
I do like this . i create a component like this. I also added few console to debug. here is my debug statement
console.log('========',depth,depth === 1);
debug statement output ======== 3 false
5MobileHeader.tsx:63 ======== 4 false
MobileHeader.tsx:63 ======== 3 false
3MobileHeader.tsx:63 ======== 4 false
component call
<CardHeader border={depth === 1}>
component definition
interface CardHeaderProps {
border: boolean;
}
export const CardHeader = styled(Card.Header)<CardHeaderProps>`
background-color: transparent;
border-radius: 0 !important;
border: 0;
padding: 10px 20px;
${props =>
props.border &&
css`
border-bottom: 1px solid #dad8d8;
`}
`;