From 38339b84dc67cbd60a47cd6247866af3bc96744a Mon Sep 17 00:00:00 2001 From: jongomez Date: Tue, 7 Nov 2023 15:30:30 +0000 Subject: [PATCH] fix: use withIcon modifier instead of withoutIcon --- .../lsd-react/src/components/TabItem/TabItem.classes.ts | 2 +- packages/lsd-react/src/components/TabItem/TabItem.styles.ts | 6 +++--- packages/lsd-react/src/components/TabItem/TabItem.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/lsd-react/src/components/TabItem/TabItem.classes.ts b/packages/lsd-react/src/components/TabItem/TabItem.classes.ts index 47be876..d88afc5 100644 --- a/packages/lsd-react/src/components/TabItem/TabItem.classes.ts +++ b/packages/lsd-react/src/components/TabItem/TabItem.classes.ts @@ -9,5 +9,5 @@ export const tabItemClasses = { medium: 'lsd-tab-item--medium', large: 'lsd-tab-item--large', - tabWithoutIcon: 'lsd-tab-item--without-icon', + withIcon: 'lsd-tab-item--with-icon', } diff --git a/packages/lsd-react/src/components/TabItem/TabItem.styles.ts b/packages/lsd-react/src/components/TabItem/TabItem.styles.ts index 806aaf5..be4eac3 100644 --- a/packages/lsd-react/src/components/TabItem/TabItem.styles.ts +++ b/packages/lsd-react/src/components/TabItem/TabItem.styles.ts @@ -10,7 +10,7 @@ export const TabItemStyles = css` display: flex; flex-direction: row; align-items: center; - justify-content: space-between; + justify-content: center; &:hover { text-decoration: underline; @@ -41,8 +41,8 @@ export const TabItemStyles = css` } } - .${tabItemClasses.tabWithoutIcon} { - justify-content: center; + .${tabItemClasses.withIcon} { + justify-content: space-between; } .${tabItemClasses.disabled} { diff --git a/packages/lsd-react/src/components/TabItem/TabItem.tsx b/packages/lsd-react/src/components/TabItem/TabItem.tsx index aa5e950..1f3a916 100644 --- a/packages/lsd-react/src/components/TabItem/TabItem.tsx +++ b/packages/lsd-react/src/components/TabItem/TabItem.tsx @@ -51,7 +51,7 @@ export const TabItem: React.FC & { tabItemClasses[size], selected && tabItemClasses.selected, props.disabled && tabItemClasses.disabled, - !icon && tabItemClasses.tabWithoutIcon, + !!icon && tabItemClasses.withIcon, )} onClick={onClick} >