From 17f7acbb365dc12620d809d46fc1da9deb9bdea6 Mon Sep 17 00:00:00 2001 From: Just James Date: Fri, 27 Mar 2026 10:53:22 +0100 Subject: [PATCH] feat: add reusable creator ui primitives --- .../common/CompactSectionSubtitle.tsx | 25 ++++++ src/components/common/CreatorCard.tsx | 11 +++ .../common/CreatorListRowDivider.tsx | 21 +++++ .../common/CreatorProfileInfoGrid.tsx | 42 ++++++++++ src/components/common/MiniStatChip.tsx | 31 +++++++ src/components/common/SectionHeading.tsx | 80 +++++++++---------- src/pages/LandingPage.tsx | 33 ++++++++ 7 files changed, 202 insertions(+), 41 deletions(-) create mode 100644 src/components/common/CompactSectionSubtitle.tsx create mode 100644 src/components/common/CreatorListRowDivider.tsx create mode 100644 src/components/common/CreatorProfileInfoGrid.tsx create mode 100644 src/components/common/MiniStatChip.tsx diff --git a/src/components/common/CompactSectionSubtitle.tsx b/src/components/common/CompactSectionSubtitle.tsx new file mode 100644 index 00000000..66b402c8 --- /dev/null +++ b/src/components/common/CompactSectionSubtitle.tsx @@ -0,0 +1,25 @@ +import type { ReactNode } from 'react'; +import { cn } from '@/lib/utils'; + +interface CompactSectionSubtitleProps { + children: ReactNode; + className?: string; +} + +const CompactSectionSubtitle: React.FC = ({ + children, + className, +}) => { + return ( +

+ {children} +

+ ); +}; + +export default CompactSectionSubtitle; diff --git a/src/components/common/CreatorCard.tsx b/src/components/common/CreatorCard.tsx index aa67ffc9..f78cfc38 100644 --- a/src/components/common/CreatorCard.tsx +++ b/src/components/common/CreatorCard.tsx @@ -13,6 +13,8 @@ import CreatorInitialsAvatar from '@/components/common/CreatorInitialsAvatar'; import WalletConnectCalloutBanner from '@/components/common/WalletConnectCalloutBanner'; import CreatorSocialLinksList from '@/components/common/CreatorSocialLinksList'; import TransactionStatusIcon from '@/components/common/TransactionStatusIcon'; +import MiniStatChip from '@/components/common/MiniStatChip'; +import CreatorListRowDivider from '@/components/common/CreatorListRowDivider'; interface CreatorCardProps { creator: Course; @@ -92,6 +94,15 @@ const CreatorCard: React.FC = ({ creator, className }) => {

@{creator.instructorId || 'creator'}

+
+ + + +
+
= ({ + className, +}) => { + return ( + )} + + + +
+
+ + + Use the same subtitle pattern beneath headings, then drop + repeated creator facts into one responsive grid that stays + tidy on mobile and desktop. + +
+ + + +
+
+ +
);