From f73ec4b812de6cfc1d5fa0897e904751fadd5d25 Mon Sep 17 00:00:00 2001 From: Alexandre Lara Date: Thu, 23 Mar 2023 15:52:12 -0300 Subject: [PATCH 1/6] Add Skeleton component --- assets/js/base/components/skeleton/index.tsx | 22 +++++++++++++++++++ assets/js/base/components/skeleton/style.scss | 19 ++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 assets/js/base/components/skeleton/index.tsx create mode 100644 assets/js/base/components/skeleton/style.scss diff --git a/assets/js/base/components/skeleton/index.tsx b/assets/js/base/components/skeleton/index.tsx new file mode 100644 index 00000000000..6249d108bab --- /dev/null +++ b/assets/js/base/components/skeleton/index.tsx @@ -0,0 +1,22 @@ +/** + * Internal dependencies + */ +import './style.scss'; + +export interface SkeletonProps { + numberOfLines?: number; +} + +export const Skeleton = ( { + numberOfLines = 1, +}: SkeletonProps ): JSX.Element => { + const skeletonLines = Array( numberOfLines ).fill( +