Skip to content

Commit 8adff56

Browse files
author
Kubit
committed
Improve dot Component
1 parent 50555aa commit 8adff56

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

src/components/dot/dot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const DotComponent = React.forwardRef(
2828
<DotStandAlone
2929
{...props}
3030
ref={ref}
31-
formatedNumber={size !== 'SMALL' ? formattedNumber : undefined}
31+
formatedNumber={formattedNumber}
3232
sizeStyles={sizeStyles}
3333
styles={styles}
3434
/>

src/components/dot/dotStandAlone.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DotStyled } from './dot.styled';
44
import { IDotStandAlone } from './types/dot';
55

66
const DotStandAloneComponent = (
7-
{ formatedNumber, sizeStyles, styles, dataTestId = 'dot', height, width }: IDotStandAlone,
7+
{ formatedNumber, label, sizeStyles, styles, dataTestId = 'dot', height, width }: IDotStandAlone,
88
ref: React.ForwardedRef<HTMLSpanElement> | undefined | null
99
): JSX.Element => {
1010
return (
@@ -16,6 +16,7 @@ const DotStandAloneComponent = (
1616
sizeStyles={sizeStyles}
1717
styles={styles}
1818
>
19+
{label}
1920
{formatedNumber}
2021
</DotStyled>
2122
);

src/components/dot/stories/dot.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const Dot: Story = {
3030
variant: Object.values(variantsObject[themeSelected].DotVariantType || {})[0] as string,
3131
size: Object.values(variantsObject[themeSelected].DotSizeType || {})[0] as string,
3232
number: 2,
33+
label: 'label',
3334
themeArgs: themesObject[themeSelected][STYLES_NAME.DOT],
3435
},
3536
};

src/components/dot/types/dot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface IDotStandAlone {
2525
formatedNumber?: number | string;
2626
width?: string;
2727
height?: string;
28+
label?: string;
2829
dataTestId?: string;
2930
}
3031

0 commit comments

Comments
 (0)