From 19adff1d875465b832ed38144a6a06035573d2d4 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 12 Oct 2022 15:39:42 +0200 Subject: [PATCH] Send skeleton properties down to sibling components --- .../src/components/upload/Upload.tsx | 156 +++++++++--------- 1 file changed, 76 insertions(+), 80 deletions(-) diff --git a/packages/dnb-eufemia/src/components/upload/Upload.tsx b/packages/dnb-eufemia/src/components/upload/Upload.tsx index 549535d7ea6..719bf9491fb 100644 --- a/packages/dnb-eufemia/src/components/upload/Upload.tsx +++ b/packages/dnb-eufemia/src/components/upload/Upload.tsx @@ -11,7 +11,7 @@ import HeightAnimation from '../height-animation/HeightAnimation' // Shared import { createSpacingClasses } from '../space/SpacingHelper' -import { createSkeletonClass } from '../skeleton/SkeletonHelper' +import Skeleton from '../skeleton/Skeleton' import Context from '../../shared/Context' import { extendPropsWithContext } from '../../shared/component-helper' import { format } from '../number-format/NumberUtils' @@ -58,7 +58,6 @@ const Upload = (localProps: UploadProps & SpacingProps & LocaleProps) => { ...props } = extendedProps - const skeletonClasses = createSkeletonClass('shape', skeleton, context) const spacingClasses = createSpacingClasses(props) const { files, setFiles } = useUpload(id) @@ -71,87 +70,84 @@ const Upload = (localProps: UploadProps & SpacingProps & LocaleProps) => { - - {title} - - -

- {text} -

- -
- -
- {formatsDescription} -
-
- {prettyfiedAcceptedFileFormats} -
-
- - -
- {fileSizeDescription} -
-
- {String(fileSizeContent).replace( - '%size', - format(fileMaxSize).toString() - )} -
-
-
- - - - - - - + + {title} + + +

+ {text} +

+ +
+ +
+ {formatsDescription} +
+
+ {prettyfiedAcceptedFileFormats} +
+
+ + +
+ {fileSizeDescription} +
+
+ {String(fileSizeContent).replace( + '%size', + format(fileMaxSize).toString() + )} +
+
+
+ + - + + + + + + +
)