diff --git a/components/dashboard/package.json b/components/dashboard/package.json index bfe2ea82e5e265..eb1074a84b2d44 100644 --- a/components/dashboard/package.json +++ b/components/dashboard/package.json @@ -10,6 +10,7 @@ "@gitpod/gitpod-protocol": "0.1.5", "@gitpod/public-api": "0.1.5", "@gitpod/public-api-common": "0.1.5", + "@mux/mux-player-react": "^3.1.0", "@radix-ui/react-accordion": "^1.2.1", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", diff --git a/components/dashboard/src/components/podkit/loading/Skeleton.tsx b/components/dashboard/src/components/podkit/loading/Skeleton.tsx new file mode 100644 index 00000000000000..967e68734c38bf --- /dev/null +++ b/components/dashboard/src/components/podkit/loading/Skeleton.tsx @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +import { cn, PropsWithClassName } from "@podkit/lib/cn"; +import { PropsWithChildren } from "react"; + +type SkeletonProps = { + ready: boolean; + failed?: boolean; + hideOnFailed?: boolean; + animate?: boolean; +}; +export const SkeletonBlock = ({ + failed, + ready, + animate, + children, + className, + hideOnFailed, +}: PropsWithChildren): JSX.Element => { + if (ready && children) { + return <>{children}; + } + + return ( +