Skip to content

Commit 07712d9

Browse files
authored
SOV-931: use Paragraph component for vertical tabs (#73)
* fix: use Paragraph component for vertical tabs * fix: review comments
1 parent 801e2b8 commit 07712d9

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

.changeset/fast-sloths-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sovryn/ui': patch
3+
---
4+
5+
SOV-931: use Paragraph component for vertical tabs

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.changeset/
12
build/
23
node_modules/
34
package-lock.json

packages/ui/src/1_atoms/Paragraph/Paragraph.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.paragraph {
2-
@apply text-white m-0;
2+
@apply m-0;
33

44
/* SIZES ================================================================== */
55
&.tiny {

packages/ui/src/2_molecules/VerticalTabs/components/VerticalTabItem.module.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
&.active, &:hover {
55
@apply text-opacity-100;
66
}
7-
8-
& p {
9-
@apply text-base;
10-
}
117

12-
& small {
13-
@apply block text-xs mt-2;
8+
& .info {
9+
@apply block mt-2;
1410
}
1511
}

packages/ui/src/2_molecules/VerticalTabs/components/VerticalTabItem.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { FC } from 'react';
22

33
import classNames from 'classnames';
44

5+
import { Paragraph, ParagraphSize } from '../../../1_atoms';
56
import { applyDataAttr } from '../../../utils';
67
import { VerticalTabsItemButtonProps } from '../VerticalTabs.types';
78
import styles from './VerticalTabItem.module.css';
@@ -22,8 +23,8 @@ export const VerticalTabItem: FC<VerticalTabsItemButtonProps> = ({
2223
data-active={active}
2324
onClick={onClick}
2425
>
25-
<p className={styles.label}>{label}</p>
26-
{infoText && <small className={styles.info}>{infoText}</small>}
26+
<Paragraph size={ParagraphSize.base}>{label}</Paragraph>
27+
{infoText && <Paragraph className={styles.info}>{infoText}</Paragraph>}
2728
</button>
2829
);
2930
};

0 commit comments

Comments
 (0)