Skip to content

Commit 5007b45

Browse files
authored
Simplify Section component layout (#95)
* refactor: simplify Section component layout * refactor: simplify trusted-by component layout
1 parent d6be8f5 commit 5007b45

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

apps/docs/components/landing/section.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type React from 'react';
2+
import { cn } from '@/lib/utils';
23
import SectionSvg from './section-svg';
34

45
const Section = ({
@@ -18,20 +19,14 @@ const Section = ({
1819
}) => {
1920
return (
2021
<div
21-
className={`relative w-full ${customPaddings ? '' : 'py-8 sm:py-12 lg:py-16 xl:py-20'} ${className || ''} `}
22+
className={cn(
23+
'relative w-full border-x-0 lg:border-x',
24+
!customPaddings && 'py-8 sm:py-12 lg:py-16 xl:py-20',
25+
className
26+
)}
2227
id={id}
2328
>
24-
<div className="flex w-full">
25-
{/* Left border line - hidden on mobile, visible on larger screens */}
26-
<div className="hidden w-px flex-shrink-0 bg-stone-200 lg:block dark:bg-border" />
27-
28-
{/* Content with spacing */}
29-
<div className="flex-1">{children}</div>
30-
31-
{/* Right border line - hidden on mobile, visible on larger screens */}
32-
<div className="hidden w-px flex-shrink-0 bg-stone-200 lg:block dark:bg-border" />
33-
</div>
34-
29+
{children}
3530
{crosses && <SectionSvg crossesOffset={crossesOffset} />}
3631
</div>
3732
);

apps/docs/components/landing/trusted-by.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,11 @@ import { LogoCarousel } from './logo-carousel';
103103

104104
export const TrustedBy = () => {
105105
return (
106-
<div className="relative flex h-full w-full flex-col items-center overflow-hidden px-4 pt-6 sm:px-6 sm:pt-8 md:px-8">
107-
<div className="w-full max-w-6xl space-y-6 text-center sm:space-y-8">
108-
<h2 className="mx-auto max-w-xs font-medium text-foreground text-lg leading-tight sm:max-w-sm sm:text-xl md:text-2xl">
109-
Trusted by developers around the world
110-
</h2>
111-
<div className="w-full">
112-
<LogoCarousel columns={3} logos={logos} />
113-
</div>
114-
</div>
106+
<div className="space-y-6 sm:space-y-8">
107+
<h2 className="mx-auto max-w-xs text-center font-medium text-foreground text-lg leading-tight sm:max-w-sm sm:text-xl md:text-2xl">
108+
Trusted by developers around the world
109+
</h2>
110+
<LogoCarousel columns={3} logos={logos} />
115111
</div>
116112
);
117113
};

0 commit comments

Comments
 (0)