diff --git a/src/components/FeaturedContent/FeaturedContent.tsx b/src/components/FeaturedContent/FeaturedContent.tsx index d537c7e25c..7ffd93e488 100644 --- a/src/components/FeaturedContent/FeaturedContent.tsx +++ b/src/components/FeaturedContent/FeaturedContent.tsx @@ -83,19 +83,21 @@ export const FeaturedContent = chakra( return ( - - + + + + + {textContent} - {textContent} ); } diff --git a/src/components/FeaturedContent/__snapshots__/FeaturedContent.test.tsx.snap b/src/components/FeaturedContent/__snapshots__/FeaturedContent.test.tsx.snap index 40d6121fb4..f5c18147fe 100644 --- a/src/components/FeaturedContent/__snapshots__/FeaturedContent.test.tsx.snap +++ b/src/components/FeaturedContent/__snapshots__/FeaturedContent.test.tsx.snap @@ -6,52 +6,56 @@ exports[`Renders the UI snapshot correctly 1`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
@@ -63,52 +67,56 @@ exports[`Renders the UI snapshot correctly 2`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
@@ -120,52 +128,56 @@ exports[`Renders the UI snapshot correctly 3`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
@@ -177,52 +189,56 @@ exports[`Renders the UI snapshot correctly 4`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
@@ -234,52 +250,56 @@ exports[`Renders the UI snapshot correctly 5`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
@@ -291,52 +311,56 @@ exports[`Renders the UI snapshot correctly 6`] = ` data-testid="featuredcontent" >
- Image example -
-
-
-
-
-
-

+

+
+
+
+
+
- Featured +

+ Featured +

+

+ Spotlight on the Public Domain +

+
+

+ The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways.

-

- Spotlight on the Public Domain -

- -

- The New York Public Library recently enhanced access to all public domain items in Digital Collections so that everyone has the freedom to enjoy and reuse these materials in almost limitless ways. -

- + Discover more + +
diff --git a/src/theme/components/featuredContent.ts b/src/theme/components/featuredContent.ts index 1bbcdbdee0..d9f891e0e4 100644 --- a/src/theme/components/featuredContent.ts +++ b/src/theme/components/featuredContent.ts @@ -30,7 +30,6 @@ const FeaturedContent = { _dark: { bgColor: "dark.ui.bg.default", }, - ...wrapperStyles, width: full ? "100vw" : "100%", left: full ? "50%" : "auto", right: full ? "50%" : "auto", @@ -38,12 +37,16 @@ const FeaturedContent = { position: full ? "relative" : "auto", marginLeft: full ? "-50vw" : "auto", marginRight: full ? "-50vw" : "auto", - minHeight: "320px", - display: "flex", - alignItems: "stretch", - flexDirection: imageAtEnd - ? { sm: "column-reverse", md: "row-reverse" } - : { sm: "column", md: "row" }, + wrapper: { + ...wrapperStyles, + minHeight: "320px", + maxWidth: "1280px", + display: "flex", + alignItems: "stretch", + flexDirection: imageAtEnd + ? { sm: "column-reverse", md: "row-reverse" } + : { sm: "column", md: "row" }, + }, text: { display: "flex", padding: "20px",