From 9e9b8f78f0f240792df7b91d50e171f2cf391c5b Mon Sep 17 00:00:00 2001 From: Federico Leiva Date: Sat, 6 Aug 2022 01:43:43 -0300 Subject: [PATCH] fix: forward isActive prop in tab --- .../workspace/docs/components/tabs/Tabs.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/ligo-virgo/src/pages/workspace/docs/components/tabs/Tabs.tsx b/apps/ligo-virgo/src/pages/workspace/docs/components/tabs/Tabs.tsx index 3722c5e162..fc06d826bc 100644 --- a/apps/ligo-virgo/src/pages/workspace/docs/components/tabs/Tabs.tsx +++ b/apps/ligo-virgo/src/pages/workspace/docs/components/tabs/Tabs.tsx @@ -11,15 +11,15 @@ const StyledTabs = styled('div')({ cursor: 'pointer', }); -const StyledDivider = styled(Divider)<{ isActive?: boolean }>( - ({ isActive }) => { - return { - flex: 1, - backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB', - borderWidth: '2px', - }; - } -); +const StyledDivider = styled(Divider, { + shouldForwardProp: (prop: string) => !['isActive'].includes(prop), +})<{ isActive?: boolean }>(({ isActive }) => { + return { + flex: 1, + backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB', + borderWidth: '2px', + }; +}); const TAB_TITLE = { PAGES: 'pages',