Skip to content

Commit df48aed

Browse files
committed
feat: add loading preview styles
1 parent 7fe596e commit df48aed

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/v2/styles/LinkPreview/LinkPreview-layout.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,22 @@
4646
@include utils.button-reset;
4747
cursor: pointer;
4848
}
49+
}
50+
51+
.str-chat__link-preview-card--loading {
52+
.str-chat__link-preview-card__content {
53+
display: flex;
54+
flex-direction: column;
55+
gap: 0.25rem;
56+
57+
.str-chat__link-preview-card__content-title {
58+
height: calc(var(--str-chat__spacing-px) * 16);
59+
width: 100%
60+
}
61+
62+
.str-chat__link-preview-card__content-description {
63+
height: calc(var(--str-chat__spacing-px) * 12);
64+
width: 100%;
65+
}
66+
}
4967
}

src/v2/styles/LinkPreview/LinkPreview-theme.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
@use '../utils';
2+
3+
.str-chat {
4+
--str-chat__link-preview-loading-state-color: var(--str-chat__disabled-color);
5+
}
6+
17
.str-chat__link-preview-card {
28
.str-chat__link-preview-card__content {
39
border-left: 2px solid var(--str-chat__primary-color);
@@ -14,4 +20,13 @@
1420
.str-chat__link-preview-card__dismiss-button svg path {
1521
fill: var(--str-chat__text-low-emphasis-color);
1622
}
23+
}
24+
25+
.str-chat__link-preview-card--loading {
26+
.str-chat__link-preview-card__content-title,
27+
.str-chat__link-preview-card__content-description {
28+
@include utils.loading-item-background('link-preview');
29+
@include utils.loading-animation;
30+
border-radius: calc(var(--str-chat__spacing-px) * 3);
31+
}
1732
}

0 commit comments

Comments
 (0)