Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/Container/Container.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import PropTypes from "prop-types";

import "./Container.scss";
// Tailwind CSS is now used for styling. Custom SCSS removed.

export default function Container(props = {}) {
const { className = "" } = props;

return <div className={`container ${className}`}>{props.children}</div>;
return (
<div className={`w-full max-w-[1024px] mx-auto ${className}`}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need max-w-[1024px], Can we use Tailwind's built-in utility class instead of hardcoding?

{props.children}
</div>
);
}

Container.propTypes = {
Expand Down
9 changes: 0 additions & 9 deletions src/components/Container/Container.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Container renders correctly with children and className 1`] = `
<div
class="container test-class"
class="w-full max-w-[1024px] mx-auto test-class"
>
<p>
Child content
Expand All @@ -12,7 +12,7 @@ exports[`Container renders correctly with children and className 1`] = `

exports[`Container renders correctly without className 1`] = `
<div
class="container "
class="w-full max-w-[1024px] mx-auto "
>
<span>
Simple child
Expand Down
Loading