Skip to content

Commit bad19d5

Browse files
authored
feat(fuselage): Skeleton Circle Variant (#1006)
1 parent 9682ae2 commit bad19d5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

packages/fuselage/src/components/Skeleton/Skeleton.stories.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ RectVariant.args = {
4040
width: '50%',
4141
height: 100,
4242
};
43+
44+
export const CircleVariant: ComponentStory<typeof Skeleton> = Template.bind({});
45+
CircleVariant.args = {
46+
variant: 'circle',
47+
width: 16,
48+
height: 16,
49+
};

packages/fuselage/src/components/Skeleton/Skeleton.styles.scss

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
content: '\00a0';
2424
}
2525
}
26+
27+
&--circle {
28+
border-radius: lengths.border-radius(full);
29+
}
2630
}
2731

2832
@keyframes rcx-skeleton__animation {

packages/fuselage/src/components/Skeleton/Skeleton.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import Box from '../Box';
55

66
type SkeletonProps = ComponentProps<typeof Box> & {
7-
variant?: 'text' | 'rect';
7+
variant?: 'text' | 'rect' | 'circle';
88
};
99

1010
const Skeleton = ({ variant = 'text', ...props }: SkeletonProps) => (
@@ -13,6 +13,7 @@ const Skeleton = ({ variant = 'text', ...props }: SkeletonProps) => (
1313
rcx-skeleton
1414
rcx-skeleton--text={variant === 'text'}
1515
rcx-skeleton--rect={variant === 'rect'}
16+
rcx-skeleton--circle={variant === 'circle'}
1617
{...props}
1718
/>
1819
);

0 commit comments

Comments
 (0)