When using next.js, the className is passed as props from parent to child component. The cardClassName and bgColor are both className props.
function Custom_Use_Cases({ caseData, cardClassName, bgcolor }) {
return (
<section className={use_case.use_case_section + ' '}>
<div
className={clsx(
'cx-container',
use_case.use_case_content,
use_case[{ cardClassName }]
)}
>
<p className={clsx(use_case.section_header_text)}>Use Cases</p>
<div className={clsx(use_case.card_section)}>
.
.
</div>
</div>
</section>
);
}
EDIT
<CustomUseCase
caseData={use_case}
cardClassName='cdn-use-case'
bgcolor='blue-background'
/>
I have tried everything I could think of without success. Is there a solution that can make it work?