Skip to content

Commit d8c1492

Browse files
authored
fix: Improved the type of styleOptionsToCssProperties (#222)
1 parent 672e93c commit d8c1492

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Skeleton.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ function styleOptionsToCssProperties({
1818
direction,
1919
duration,
2020
enableAnimation = defaultEnableAnimation,
21-
}: SkeletonStyleProps & { circle: boolean }): CSSProperties {
22-
const style: CSSProperties & Record<`--${string}`, string> = {};
21+
}: SkeletonStyleProps & { circle: boolean }): CSSProperties &
22+
Record<`--${string}`, string> {
23+
const style: ReturnType<typeof styleOptionsToCssProperties> = {};
2324

2425
if (direction === 'rtl') style['--animation-direction'] = 'reverse';
2526
if (typeof duration === 'number')

0 commit comments

Comments
 (0)