Incorporating JSX syntax with *.css for my react component. Displayed below is the jsx code for the antd collapse section.
<Collapse
defaultActiveKey={["1"]}
expandIconPosition="right"
>
<Panel
header="This is panel header with arrow icon"
key="1"
>
<div>
Body-123
</div>
</Panel>
</Collapse>
Presently, I want to specifically style (border: "3px solid red"
) the header section of the Collapse using the following css:
.ant-collapse > .ant-collapse-item > .ant-collapse-header
However, the challenge lies in the fact that I am looking to achieve this dynamically based on a condition within the jsx code. Each panel should have a different border color depending on certain data.
Thanks in advance.