Skip to content

Commit 717ca43

Browse files
committed
Migrate Container to Tailwind utility classes
Replace the Container SCSS-based layout with Tailwind utility classes. Removed Container.scss and its import, updated Container.jsx to render <div className="w-full max-w-5xl mx-auto ..."> and adjusted related snapshot. Also updated Footer to use the new max-w-5xl class so layout remains consistent. This migrates layout styling from a component SCSS file to utility classes.
1 parent 8d1ef38 commit 717ca43

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

src/components/Container/Container.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import PropTypes from "prop-types";
22

3-
import "./Container.scss";
4-
53
export default function Container(props = {}) {
64
const { className = "" } = props;
75

8-
return <div className={`container ${className}`}>{props.children}</div>;
6+
return (
7+
<div className={`w-full max-w-5xl mx-auto ${className}`}>
8+
{props.children}
9+
</div>
10+
);
911
}
1012

1113
Container.propTypes = {

src/components/Container/Container.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/Container/__snapshots__/Container.test.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Container renders correctly with children and className 1`] = `
44
<div
5-
class="container test-class"
5+
class="w-full max-w-5xl mx-auto test-class"
66
>
77
<p>
88
Child content
@@ -12,7 +12,7 @@ exports[`Container renders correctly with children and className 1`] = `
1212

1313
exports[`Container renders correctly without className 1`] = `
1414
<div
15-
class="container "
15+
class="w-full max-w-5xl mx-auto "
1616
>
1717
<span>
1818
Simple child

src/components/Footer/Footer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const footerLinkClasses =
1010

1111
const Footer = () => (
1212
<footer className="w-full flex-[0_0_auto] print:hidden">
13-
<Container className="mx-auto max-w-[900px] px-5 pb-[30px] pt-[40px] text-center [&_a]:text-[#3b7eb5]">
13+
<Container className="mx-auto max-w-5xl px-5 pb-[30px] pt-[40px] text-center [&_a]:text-[#3b7eb5]">
1414
<div className="mb-[24px] flex justify-center">
1515
<a href="https://openjsf.org" target="_blank" rel="noopener noreferrer">
1616
<img

0 commit comments

Comments
 (0)