diff --git a/packages/shared-components/playwright/snapshots/room-banner--with-action-linux.png b/packages/shared-components/playwright/snapshots/room-banner--with-action-linux.png index 563cadf027..b3968f9db7 100644 Binary files a/packages/shared-components/playwright/snapshots/room-banner--with-action-linux.png and b/packages/shared-components/playwright/snapshots/room-banner--with-action-linux.png differ diff --git a/packages/shared-components/playwright/snapshots/room-banner--with-loads-of-content-linux.png b/packages/shared-components/playwright/snapshots/room-banner--with-loads-of-content-linux.png new file mode 100644 index 0000000000..85372e48fa Binary files /dev/null and b/packages/shared-components/playwright/snapshots/room-banner--with-loads-of-content-linux.png differ diff --git a/packages/shared-components/src/composer/Banner/Banner.module.css b/packages/shared-components/src/composer/Banner/Banner.module.css index 077212354e..7bb48a9cc2 100644 --- a/packages/shared-components/src/composer/Banner/Banner.module.css +++ b/packages/shared-components/src/composer/Banner/Banner.module.css @@ -27,8 +27,6 @@ padding: var(--cpd-space-4x); border-top: 1px solid var(--cpd-color-gray-400); - - white-space: nowrap; } .banner[data-type="success"] { @@ -90,4 +88,6 @@ flex-direction: row; gap: var(--cpd-space-1x); align-self: center; + + white-space: nowrap; } diff --git a/packages/shared-components/src/composer/Banner/Banner.stories.tsx b/packages/shared-components/src/composer/Banner/Banner.stories.tsx index 53d3941621..e1e3e110fb 100644 --- a/packages/shared-components/src/composer/Banner/Banner.stories.tsx +++ b/packages/shared-components/src/composer/Banner/Banner.stories.tsx @@ -11,7 +11,6 @@ import { type Meta, type StoryObj } from "@storybook/react-vite"; import { Button } from "@vector-im/compound-web"; import { Banner } from "./Banner"; -import { _t } from "../../utils/i18n"; const meta = { title: "room/Banner", @@ -46,17 +45,14 @@ export const WithAction: Story = { args: { children: (
- {_t( - "encryption|pinned_identity_changed", - { displayName: "Alice", userId: "@alice:example.org" }, - { - a: (sub) => {sub}, - b: (sub) => {sub}, - }, - )} + Alice's (@alice:example.com) identity was reset. Learn more
), - actions: , + actions: ( + + ), }, }; @@ -71,3 +67,19 @@ export const WithoutClose: Story = { onClose: undefined, }, }; + +export const WithLoadsOfContent: Story = { + args: { + type: "info", + children: ( ++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis massa facilisis, venenatis risus + consectetur, sagittis libero. Aenean et scelerisque justo. Nunc luctus, mi sed facilisis suscipit, magna + ante pharetra sem, eu rutrum purus quam quis arcu. Sed eleifend arcu vitae magna sodales, sit amet + fermentum urna dictum. Mauris vel velit pulvinar enim mollis tincidunt. Vivamus egestas rhoncus + sagittis. Curabitur auctor vehicula massa, et cursus lacus laoreet a. Maecenas et sollicitudin lectus, + in ligula. +
+ ), + }, +}; diff --git a/packages/shared-components/src/composer/Banner/Banner.tsx b/packages/shared-components/src/composer/Banner/Banner.tsx index 392b2a2610..7781442ed9 100644 --- a/packages/shared-components/src/composer/Banner/Banner.tsx +++ b/packages/shared-components/src/composer/Banner/Banner.tsx @@ -79,7 +79,7 @@ export function Banner({ return (- encryption|pinned_identity_changed + Alice's ( + + @alice:example.com + + ) identity was reset. + + Learn more +
- +Hello! This is a status banner.
- +Hello! This is a status banner.
- +Hello! This is a status banner.
- +Hello! This is a status banner.
- +Hello! This is a status banner.
- +