1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

[CL-427] Add skeleton loading components to the CL (#16728)

This commit is contained in:
Vicki League
2025-10-16 09:36:16 -04:00
committed by GitHub
parent 96d40ae5c0
commit ba5c93fae2
14 changed files with 427 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { CommonModule } from "@angular/common";
import { Component, input } from "@angular/core";
/**
* Basic skeleton loading component that can be used to represent content that is loading.
* Use for layout-level elements and text, not for interactive elements.
*
* Customize the shape's edges with the `edgeShape` input. Customize the shape's size by
* applying classes to the `bit-skeleton` element (i.e. `tw-w-40 tw-h-8`).
*
* If you're looking to represent lines of text, use the `bit-skeleton-text` helper component.
*/
@Component({
selector: "bit-skeleton",
templateUrl: "./skeleton.component.html",
imports: [CommonModule],
host: {
class: "tw-block",
},
})
export class SkeletonComponent {
/**
* The shape of the corners of the skeleton element
*/
readonly edgeShape = input<"box" | "circle">("box");
}