diff --git a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx
index 5159c0dea27..8c06e3ed50b 100644
--- a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx
+++ b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx
@@ -27,6 +27,9 @@ const UiBox = styled.div<{ $elevation: Elevation }>`
padding: ${spacingsPx.sm};
border-radius: ${borders.radii.sm};
width: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: ${spacingsPx.sm};
`;
const meta: Meta = {
@@ -69,14 +72,12 @@ const TextareaExtender = ({ children }: { children: ReactNode }) => {
);
};
-export const Box = ({ children }: { children?: ReactNode }) => {
+const Box = ({ children }: { children?: ReactNode }) => {
const { elevation } = useElevation();
return (
- Elevation: {elevation}
-
-
+ Elevation: {elevation}
{children}
);
diff --git a/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx b/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx
index 70a836674e1..ab49b568bbd 100644
--- a/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx
+++ b/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx
@@ -1,9 +1,43 @@
+import { ReactNode } from 'react';
+
import { Meta, StoryObj } from '@storybook/react';
+import styled from 'styled-components';
+
+import {
+ borders,
+ Elevation,
+ mapElevationToBackground,
+ mapElevationToBorder,
+ spacingsPx,
+} from '@trezor/theme';
import {
SkeletonRectangle as SkeletonRectangleComponent,
SkeletonRectangleProps,
} from './SkeletonRectangle';
+import { ElevationContext, ElevationUp, useElevation } from '../ElevationContext/ElevationContext';
+
+const UiBox = styled.div<{ $elevation: Elevation }>`
+ background-color: ${mapElevationToBackground};
+ border: 1px solid ${mapElevationToBorder};
+ padding: ${spacingsPx.sm};
+ border-radius: ${borders.radii.sm};
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: ${spacingsPx.sm};
+`;
+
+const Box = ({ children }: { children?: ReactNode }) => {
+ const { elevation } = useElevation();
+
+ return (
+
+ Elevation: {elevation}
+ {children}
+
+ );
+};
const meta: Meta = {
title: 'Skeletons',
@@ -12,9 +46,24 @@ const meta: Meta = {
export default meta;
export const SkeletonRectangle: StoryObj = {
+ render: args => (
+
+
+
+
+
+
+
+
+
+
+
+
+ ),
args: {
width: 120,
height: 20,
borderRadius: 4,
+ animate: true,
},
};