ui/cards: do not include nesting level CSS variables if not necessary

This commit is contained in:
Adorian Doran 2026-02-15 19:46:08 +02:00
parent 71668f8f8d
commit e00150a876

View File

@ -31,7 +31,7 @@ export function CardSection(props: {children: ComponentChildren} & CardSectionPr
"tn-card-section-nested": nestingLevel > 0,
"tn-card-section-highlight-on-hover": props.highlightOnHover || props.onAction
})}
style={{"--tn-card-section-nesting-level": nestingLevel}}
style={{"--tn-card-section-nesting-level": (nestingLevel) ? nestingLevel : null}}
onClick={props.onAction}>
{props.children}
</section>