From 81239c7b873fb9bb74de2fd90120eaddc3efafd5 Mon Sep 17 00:00:00 2001 From: abg3000 Date: Sun, 18 Aug 2024 11:21:29 +0900 Subject: [PATCH 1/2] fix: add ref props parameter and remove duplicated reference type --- .../src/components/Skeleton/Paragraphs.tsx | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/core/sds/src/components/Skeleton/Paragraphs.tsx b/packages/core/sds/src/components/Skeleton/Paragraphs.tsx index 7c320324..260d6152 100644 --- a/packages/core/sds/src/components/Skeleton/Paragraphs.tsx +++ b/packages/core/sds/src/components/Skeleton/Paragraphs.tsx @@ -8,18 +8,16 @@ export interface SkeletonParagraphsProps extends HTMLAttributes count?: number; } -export const SkeletonParagraphs = forwardRef( - (props: SkeletonParagraphsProps) => { - const { count = 3 } = props; +export const SkeletonParagraphs = forwardRef((props, ref) => { + const { count = 3 } = props; - return ( -
- {Array.from({ length: count }, (_, index) => ( - - ))} -
- ); - }, -); + return ( +
+ {Array.from({ length: count }, (_, index) => ( + + ))} +
+ ); +}); SkeletonParagraphs.displayName = 'SkeletonParagraphs'; From ec5f98d7859037604eb57eaaa7e5220c9c012c71 Mon Sep 17 00:00:00 2001 From: abg3000 Date: Mon, 19 Aug 2024 23:02:04 +0900 Subject: [PATCH 2/2] chore: restProps --- packages/core/sds/src/components/Skeleton/Paragraphs.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/sds/src/components/Skeleton/Paragraphs.tsx b/packages/core/sds/src/components/Skeleton/Paragraphs.tsx index 260d6152..7adf30ed 100644 --- a/packages/core/sds/src/components/Skeleton/Paragraphs.tsx +++ b/packages/core/sds/src/components/Skeleton/Paragraphs.tsx @@ -9,10 +9,10 @@ export interface SkeletonParagraphsProps extends HTMLAttributes } export const SkeletonParagraphs = forwardRef((props, ref) => { - const { count = 3 } = props; + const { count = 3, ...restProps } = props; return ( -
+
{Array.from({ length: count }, (_, index) => ( ))}