Skip to content

Commit 0a58fe3

Browse files
authored
Merge pull request #43 from chiscookeke11/issue-32
Add creator profile section divider component
2 parents fc32fb3 + 76f3d5b commit 0a58fe3

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { cn } from '@/lib/utils';
2+
3+
type SectionDividerSpacing = 'compact' | 'default' | 'relaxed';
4+
5+
interface SectionDividerProps {
6+
title?: string;
7+
spacing?: SectionDividerSpacing;
8+
className?: string;
9+
}
10+
11+
const spacingClasses: Record<SectionDividerSpacing, string> = {
12+
compact: 'my-4 md:my-5',
13+
default: 'my-6 md:my-8',
14+
relaxed: 'my-8 md:my-12',
15+
};
16+
17+
function SectionDivider({ title, spacing = 'default', className }: SectionDividerProps) {
18+
return (
19+
<div className={cn('flex items-center gap-3 md:gap-4', spacingClasses[spacing], className)}>
20+
<div className="h-px flex-1 bg-white/10" aria-hidden="true" />
21+
{title ? (
22+
<span className="shrink-0 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-white/55 md:text-xs">
23+
{title}
24+
</span>
25+
) : null}
26+
<div className="h-px flex-1 bg-white/10" aria-hidden="true" />
27+
</div>
28+
);
29+
}
30+
31+
export default SectionDivider;

‎src/pages/LandingPage.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import StickyFilterBar from '@/components/common/StickyFilterBar';
55
import CreatorCard from '@/components/common/CreatorCard';
66
import { CreatorGridSkeleton } from '@/components/common/CreatorSkeleton';
77
import EmptyState from '@/components/common/EmptyState';
8+
import SectionDivider from '@/components/common/SectionDivider';
89
import { Button } from '@/components/ui/button';
910
import { UnavailableAction } from '@/components/ui/unavailable-action';
1011
import SectionHeading from '@/components/common/SectionHeading';
@@ -131,6 +132,8 @@ function LandingPage() {
131132
</div>
132133
</header>
133134

135+
<SectionDivider title="Discover creators" spacing="relaxed" />
136+
134137
<StickyFilterBar
135138
eyebrow="Marketplace filters"
136139
title="Find creators without losing your place"
@@ -144,6 +147,8 @@ function LandingPage() {
144147
/>
145148
</StickyFilterBar>
146149

150+
<SectionDivider title="Marketplace results" spacing="default" />
151+
147152
<section className="mt-2">
148153
<SectionHeading
149154
title="Explore creators"

0 commit comments

Comments
 (0)