Skip to content

Commit c389b9f

Browse files
author
Kubit
committed
Add decoration props to NavigationRow component
1 parent 5a8b5a6 commit c389b9f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/components/navigationCard/navigationCardStandAlone.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ const NavigationCardStandaloneComponent = (
3636
return (
3737
// Can not be spread -> styled component breaks
3838
<NavigationCardStyled
39-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
40-
ref={ref as any}
39+
ref={ref as React.ForwardedRef<HTMLButtonElement>}
4140
aria-disabled={props['aria-disabled']}
4241
as={props.url ? props.component : 'button'}
4342
className={props.className}

src/components/navigationRow/navigationRowStandAlone.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ const NavigationRowStandaloneComponent = (
4949
/>
5050
)}
5151
</IconAndIconHighlightedContainerStyled>
52-
<DecorativeElementContainerStyled styles={props.styles}>
53-
{props.decorativeElement}
54-
</DecorativeElementContainerStyled>
52+
{props.decorativeElement && (
53+
<DecorativeElementContainerStyled styles={props.styles}>
54+
{props.decorativeElement}
55+
</DecorativeElementContainerStyled>
56+
)}
5557
<TextSectionStyled styles={props.styles}>
5658
{props.text && (
5759
<Text

0 commit comments

Comments
 (0)