I'm working on a component library, and I'd like to wrap the Kendo Cards component with additional stuff that matches our requirements; however, I get an error about hooks being an issue due to the nesting. Is there a way around this?
import { ReactNode } from 'react';
import { Card as KendoCard } from '@progress/kendo-react-layout';
export interface CardProps {
/**
* any nested JSX elements
*/
children?: ReactNode;
}
/**
* Primary UI component for wrapping content in a card
*/
const Card = ({ children }: CardProps) => (
<KendoCard
style={{
width: 260,
boxShadow: '0 0 4px 0 rgba(0, 0, 0, .1)',
marginTop: '15px',
padding: '19px',
}}
>
{/* <KendoCardBody> */}
<h4>This is a change</h4>
{children}
{/* </KendoCardBody> */}
</KendoCard>
);
export default Card;
Hi, Jason,
Thank you for the provided code sample.
I tested it, but it was not showing any errors on my side. Therefore, could you please send me a runnable example where the issue
is reproduced so that I can assist you further? You can use my test demo as a base:
Regards,
Wissam
Progress Telerik