Update snaps again
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
@ -73,9 +73,16 @@ TitleAndDescription.args = {
|
||||
link: "https://matrix.org",
|
||||
siteName: "matrix.org",
|
||||
};
|
||||
|
||||
export const WithSiteIcon = Template.bind({});
|
||||
WithSiteIcon.args = {
|
||||
title: "A simple title",
|
||||
link: "https://matrix.org",
|
||||
siteName: "matrix.org",
|
||||
siteIcon: imageFile,
|
||||
};
|
||||
|
||||
export const WithSiteIconAndDescription = Template.bind({});
|
||||
WithSiteIconAndDescription.args = {
|
||||
title: "A simple title",
|
||||
description: "A simple description with a link to https://matrix.org",
|
||||
link: "https://matrix.org",
|
||||
|
||||
@ -47,7 +47,7 @@ function LinkTitle({
|
||||
function LinkSiteName({ siteIcon, siteName }: { siteIcon?: string; siteName: string }): JSX.Element {
|
||||
return (
|
||||
<div className={styles.siteName}>
|
||||
<Avatar size="16px" name={siteName} id={siteName} src={siteIcon} />
|
||||
{siteIcon && <Avatar size="16px" name={siteName} id={siteName} src={siteIcon} />}
|
||||
<Text as="span" size="sm" weight="regular">
|
||||
{siteName}
|
||||
</Text>
|
||||
@ -67,12 +67,14 @@ function LinkPreviewInline({
|
||||
}: Omit<LinkPreviewProps, "image" | "description" | "author" | "onImageClick">): JSX.Element {
|
||||
return (
|
||||
<div className={classNames(styles.container, styles.inline)}>
|
||||
<div className={styles.siteAvatar}>
|
||||
<Avatar type="square" size="48px" name={title} id={title} src={siteIcon} />
|
||||
</div>
|
||||
{siteIcon && (
|
||||
<div className={styles.siteAvatar}>
|
||||
<Avatar type="square" size="48px" name={title} id={title} src={siteIcon} />
|
||||
</div>
|
||||
)}
|
||||
<div className={classNames(styles.textContent, styles.inline)}>
|
||||
<LinkTitle title={title} showTooltipOnLink={showTooltipOnLink} link={link} />
|
||||
{siteName && <LinkSiteName siteName={siteName} siteIcon={siteIcon} />}
|
||||
{siteName && <LinkSiteName siteName={siteName} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -52,16 +52,6 @@ exports[`LinkPreview > renders a playable preview that can be opened with a clic
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="blog.example.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="5"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
b
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -107,16 +97,6 @@ exports[`LinkPreview > renders a preview 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="Site name"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="3"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
S
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -133,20 +113,6 @@ exports[`LinkPreview > renders a preview with just a title 1`] = `
|
||||
<div
|
||||
class="container inline"
|
||||
>
|
||||
<div
|
||||
class="siteAvatar"
|
||||
>
|
||||
<span
|
||||
aria-label="A simple title"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="6"
|
||||
data-type="square"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 48px;"
|
||||
>
|
||||
A
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="textContent inline"
|
||||
>
|
||||
@ -161,16 +127,6 @@ exports[`LinkPreview > renders a preview with just a title 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -214,16 +170,6 @@ exports[`LinkPreview > renders a preview with just a title and description 1`] =
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
|
||||
@ -40,16 +40,6 @@ exports[`UrlPreviewGroupView > renders a single preview 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -128,16 +118,6 @@ exports[`UrlPreviewGroupView > renders multiple previews 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -178,16 +158,6 @@ exports[`UrlPreviewGroupView > renders multiple previews 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -228,16 +198,6 @@ exports[`UrlPreviewGroupView > renders multiple previews 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -325,16 +285,6 @@ exports[`UrlPreviewGroupView > renders multiple previews which are hidden 1`] =
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -422,16 +372,6 @@ exports[`UrlPreviewGroupView > renders with a compact view 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -472,16 +412,6 @@ exports[`UrlPreviewGroupView > renders with a compact view 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
@ -522,16 +452,6 @@ exports[`UrlPreviewGroupView > renders with a compact view 1`] = `
|
||||
<div
|
||||
class="siteName"
|
||||
>
|
||||
<span
|
||||
aria-label="matrix.org"
|
||||
class="_avatar_zysgz_8 _avatar-imageless_zysgz_55"
|
||||
data-color="4"
|
||||
data-type="round"
|
||||
role="img"
|
||||
style="--cpd-avatar-size: 16px;"
|
||||
>
|
||||
m
|
||||
</span>
|
||||
<span
|
||||
class="_typography_6v6n8_153 _font-body-sm-regular_6v6n8_31"
|
||||
>
|
||||
|
||||