Keep the three logo-wall marks in a centered cluster instead of stretching them across the page.
The space-between row was drawn for six logos; three marks looked abandoned at the edges. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ea85be2287
commit
5bd49eaed8
3 files changed
+10
-7
No files matched your search
@@ -11,11 +11,11 @@ function LogoWallView({ displayLogos, className }: LogoWallViewProps) {
|
|||||||
data-figma-node="18483-18425"
|
data-figma-node="18483-18425"
|
||||||
>
|
>
|
||||||
<div className="w-full opacity-60">
|
<div className="w-full opacity-60">
|
||||||
<div className="flex w-full flex-col items-center gap-[38.4px] sm:flex-row sm:flex-wrap sm:justify-around md:flex-nowrap md:justify-between lg:gap-[var(--space-1200)]">
|
<div className="flex w-full flex-col items-center justify-center gap-[38.4px] sm:flex-row sm:flex-wrap sm:justify-center md:flex-nowrap lg:gap-[var(--space-1200)]">
|
||||||
{displayLogos.map((logo, index) => (
|
{displayLogos.map((logo, index) => (
|
||||||
<div
|
<div
|
||||||
key={logo.alt || index}
|
key={logo.alt || index}
|
||||||
className="flex items-center justify-center md:shrink-0"
|
className="flex shrink-0 items-center justify-center"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={logo.src}
|
src={logo.src}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ export default {
|
|||||||
|
|
||||||
## Responsive Behavior
|
## Responsive Behavior
|
||||||
|
|
||||||
- **Mobile**: stacked column
|
- **Mobile**: stacked, centered
|
||||||
- **SM+**: wrapping row
|
- **SM+**: centered wrapping cluster
|
||||||
- **MD+**: single space-between row
|
- **MD+**: single centered row with a fixed gap
|
||||||
|
|
||||||
## Props
|
## Props
|
||||||
|
|
||||||
|
|||||||
@@ -60,17 +60,20 @@ describe("LogoWall Component", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("lays out the three marks in a wrapping row", () => {
|
test("lays out the three marks as a centered cluster", () => {
|
||||||
render(<LogoWall />);
|
render(<LogoWall />);
|
||||||
|
|
||||||
const row = document.querySelector('[class*="flex w-full flex-col"]');
|
const row = document.querySelector('[class*="flex w-full flex-col"]');
|
||||||
expect(row).toBeInTheDocument();
|
expect(row).toBeInTheDocument();
|
||||||
expect(row).toHaveClass(
|
expect(row).toHaveClass(
|
||||||
|
"justify-center",
|
||||||
"sm:flex-row",
|
"sm:flex-row",
|
||||||
|
"sm:justify-center",
|
||||||
"md:flex-nowrap",
|
"md:flex-nowrap",
|
||||||
"md:justify-between",
|
|
||||||
"gap-[38.4px]",
|
"gap-[38.4px]",
|
||||||
);
|
);
|
||||||
|
expect(row).not.toHaveClass("md:justify-between");
|
||||||
|
expect(row).not.toHaveClass("sm:justify-around");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("renders logos with correct attributes", () => {
|
test("renders logos with correct attributes", () => {
|
||||||
|
|||||||
Reference in new issue
Block a user