react-magma-dom 4.15.1-next.7 → 4.16.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import { ThemeInterface } from '../../theme/magma';
3
+ export interface SkeletonProps extends React.HTMLAttributes<HTMLSpanElement> {
4
+ /**
5
+ * Optional content the skeleton will size itself to match. The children are
6
+ * kept in the layout to reserve their space but are hidden from view.
7
+ * @children optional
8
+ */
9
+ children?: React.ReactNode;
10
+ /**
11
+ * The style of animation played while loading.
12
+ * @default SkeletonAnimation.shimmer
13
+ */
14
+ animation?: SkeletonAnimation;
15
+ /**
16
+ * If true, the animation will play. The animation is always disabled
17
+ * for users who have the `prefers-reduced-motion` setting enabled, regardless
18
+ * of this value.
19
+ * @default true
20
+ */
21
+ hasAnimation?: boolean;
22
+ /**
23
+ * The height of the skeleton. Can be a string or number; if a number is
24
+ * provided the height is in px. Ignored for the `text` variant, whose height
25
+ * is fixed to the theme's body line height so it stays the size of one line
26
+ * of text.
27
+ */
28
+ height?: number | string;
29
+ isInverse?: boolean;
30
+ /**
31
+ * The value passed to the `data-testid` attribute of the rendered element, so
32
+ * it can be targeted in tests (including by consumers of the library).
33
+ */
34
+ testId?: string;
35
+ /**
36
+ * @internal
37
+ */
38
+ theme?: ThemeInterface;
39
+ /**
40
+ * The shape of the skeleton.
41
+ * @default SkeletonVariant.text
42
+ */
43
+ variant?: SkeletonVariant;
44
+ /**
45
+ * The width of the skeleton. Can be a string or number; if a number is
46
+ * provided the width is in px. Defaults to `100%` unless inferred from
47
+ * children.
48
+ */
49
+ width?: number | string;
50
+ }
51
+ export declare enum SkeletonVariant {
52
+ circle = "circle",
53
+ rectangle = "rectangle",
54
+ rounded = "rounded",
55
+ text = "text"
56
+ }
57
+ export declare enum SkeletonAnimation {
58
+ pulse = "pulse",
59
+ shimmer = "shimmer"
60
+ }
61
+ export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLSpanElement>>;