From 6c4549be35c23212185b001f4cead79aab6382ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 22:11:53 +0000 Subject: [PATCH] Split TemplatesSection.tsx into individual template components Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- src/components/templates/BlogTemplate.tsx | 102 ++++ .../templates/DashboardTemplate.tsx | 165 +++++++ .../templates/EcommerceTemplate.tsx | 97 ++++ .../templates/LandingPageTemplate.tsx | 108 +++++ src/components/templates/TemplatesSection.tsx | 458 +----------------- 5 files changed, 497 insertions(+), 433 deletions(-) create mode 100644 src/components/templates/BlogTemplate.tsx create mode 100644 src/components/templates/DashboardTemplate.tsx create mode 100644 src/components/templates/EcommerceTemplate.tsx create mode 100644 src/components/templates/LandingPageTemplate.tsx diff --git a/src/components/templates/BlogTemplate.tsx b/src/components/templates/BlogTemplate.tsx new file mode 100644 index 0000000..a6b504d --- /dev/null +++ b/src/components/templates/BlogTemplate.tsx @@ -0,0 +1,102 @@ +import { Card } from '@/components/ui/card' +import { Button } from '@/components/ui/button' +import { Badge } from '@/components/ui/badge' +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' +import { Separator } from '@/components/ui/separator' +import { ArrowRight } from '@phosphor-icons/react' + +export function BlogTemplate() { + return ( + +
+
+

Blog

+
+ + + +
+
+
+ +
+
+
+
+ Design + Tutorial +
+

+ Building a Comprehensive Component Library +

+
+ + + AW + +
+

Alex Writer

+

+ March 15, 2024 · 10 min read +

+
+
+
+ + + +
+
+ +

+ Design systems have become an essential part of modern product development. + They provide consistency, improve efficiency, and create a shared language + between designers and developers. +

+ +

+ Understanding Atomic Design +

+

+ The atomic design methodology consists of five distinct stages: atoms, + molecules, organisms, templates, and pages. Each stage builds upon the + previous, creating a comprehensive system that scales with your needs. +

+ + +

+ "A design system is never complete. It's a living, breathing ecosystem + that evolves with your product and team." +

+
+ +

Getting Started

+

+ Begin by identifying the core components your product needs. Start small + with basic atoms like buttons and inputs, then gradually build up to more + complex organisms and templates. +

+
+ + + +
+ + +
+
+
+ + ) +} diff --git a/src/components/templates/DashboardTemplate.tsx b/src/components/templates/DashboardTemplate.tsx new file mode 100644 index 0000000..42a3b37 --- /dev/null +++ b/src/components/templates/DashboardTemplate.tsx @@ -0,0 +1,165 @@ +import { Card } from '@/components/ui/card' +import { Button } from '@/components/ui/button' +import { Badge } from '@/components/ui/badge' +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' +import { + Bell, + Gear, + House, + ChartBar, + Folder, + Plus, + TrendUp, + Users, +} from '@phosphor-icons/react' + +export function DashboardTemplate() { + return ( + +
+
+
+

Dashboard

+
+
+ + + + + U + +
+
+
+ +
+ + +
+
+
+
+

Overview

+

+ Welcome back, here's what's happening +

+
+ +
+ +
+ +
+
+

Total Revenue

+

$45,231

+

+ + +20.1% from last month +

+
+
+
+ + +
+
+

Active Users

+

2,350

+

+ + +12.5% from last month +

+
+
+
+ + +
+
+

Total Orders

+

1,234

+

+ + +8.2% from last month +

+
+
+
+
+ +
+ +
+

Recent Activity

+
+
+ {[1, 2, 3].map((i) => ( +
+ + + U + +
+

+ User {i} completed a task +

+

2 hours ago

+
+
+ ))} +
+
+ + +
+

Quick Actions

+
+
+ + + +
+
+
+
+
+
+
+ ) +} diff --git a/src/components/templates/EcommerceTemplate.tsx b/src/components/templates/EcommerceTemplate.tsx new file mode 100644 index 0000000..1d9d2b9 --- /dev/null +++ b/src/components/templates/EcommerceTemplate.tsx @@ -0,0 +1,97 @@ +import { Card } from '@/components/ui/card' +import { Button } from '@/components/ui/button' +import { Input } from '@/components/ui/input' +import { Badge } from '@/components/ui/badge' +import { Avatar, AvatarFallback } from '@/components/ui/avatar' +import { Separator } from '@/components/ui/separator' +import { + MagnifyingGlass, + ShoppingCart, +} from '@phosphor-icons/react' + +export function EcommerceTemplate() { + return ( + +
+
+
+

Store

+
+ + +
+
+
+ + + U + +
+
+
+ +
+
+
+
+
+ {[1, 2, 3, 4].map((i) => ( +
+ ))} +
+
+ +
+
+ New Arrival +

Premium Product Name

+
+ $299.00 + + $399.00 + +
+
+ + + +
+

Description

+

+ Experience premium quality with this exceptional product. Crafted with + attention to detail and designed for those who demand excellence. +

+
+ +
+

Features

+
    +
  • • Premium materials and construction
  • +
  • • Industry-leading performance
  • +
  • • 2-year warranty included
  • +
  • • Free shipping on orders over $50
  • +
+
+ + + +
+ + +
+
+
+
+ + ) +} diff --git a/src/components/templates/LandingPageTemplate.tsx b/src/components/templates/LandingPageTemplate.tsx new file mode 100644 index 0000000..c84964a --- /dev/null +++ b/src/components/templates/LandingPageTemplate.tsx @@ -0,0 +1,108 @@ +import { Card } from '@/components/ui/card' +import { Button } from '@/components/ui/button' +import { Badge } from '@/components/ui/badge' +import { + ChartBar, + Users, + Gear, + ArrowRight, +} from '@phosphor-icons/react' + +export function LandingPageTemplate() { + return ( + +
+
+
+
+

ProductName

+
+
+ + + + +
+
+
+ +
+ New Release +

+ Build Amazing Products Faster +

+

+ The complete toolkit for modern product development. Ship faster with our + component library and design system. +

+
+ + +
+
+ +
+
+

Features

+

+ Everything you need to build production-ready applications +

+
+ +
+ +
+ +
+

Analytics

+

+ Track and analyze your product metrics in real-time +

+
+ + +
+ +
+

Collaboration

+

+ Work together with your team seamlessly +

+
+ + +
+ +
+

Customizable

+

+ Adapt the platform to your specific needs +

+
+
+
+ +
+

Ready to get started?

+

+ Join thousands of teams already building with our platform +

+ +
+ + ) +} diff --git a/src/components/templates/TemplatesSection.tsx b/src/components/templates/TemplatesSection.tsx index d1b186d..d4a4943 100644 --- a/src/components/templates/TemplatesSection.tsx +++ b/src/components/templates/TemplatesSection.tsx @@ -1,25 +1,10 @@ -import { Card } from '@/components/ui/card' -import { Button } from '@/components/ui/button' -import { Input } from '@/components/ui/input' -import { Badge } from '@/components/ui/badge' -import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' -import { Separator } from '@/components/ui/separator' -import { - Bell, - Gear, - House, - ChartBar, - Folder, - MagnifyingGlass, - Plus, - ArrowRight, - TrendUp, - Users, - ShoppingCart, -} from '@phosphor-icons/react' import { ComponentShowcase } from '@/components/demo/ComponentShowcase' import { templatesCodeSnippets } from '@/lib/component-code-snippets' import { Snippet } from '@/lib/types' +import { DashboardTemplate } from './DashboardTemplate' +import { LandingPageTemplate } from './LandingPageTemplate' +import { EcommerceTemplate } from './EcommerceTemplate' +import { BlogTemplate } from './BlogTemplate' interface TemplatesSectionProps { onSaveSnippet: (snippet: Omit) => void @@ -43,153 +28,8 @@ export function TemplatesSection({ onSaveSnippet }: TemplatesSectionProps) { category="templates" onSaveSnippet={onSaveSnippet} > - -
-
-
-

Dashboard

-
-
- - - - - U - -
-
-
- -
- - -
-
-
-
-

Overview

-

- Welcome back, here's what's happening -

-
- -
- -
- -
-
-

Total Revenue

-

$45,231

-

- - +20.1% from last month -

-
-
-
- - -
-
-

Active Users

-

2,350

-

- - +12.5% from last month -

-
-
-
- - -
-
-

Total Orders

-

1,234

-

- - +8.2% from last month -

-
-
-
-
- -
- -
-

Recent Activity

-
-
- {[1, 2, 3].map((i) => ( -
- - - U - -
-

- User {i} completed a task -

-

2 hours ago

-
-
- ))} -
-
- - -
-

Quick Actions

-
-
- - - -
-
-
-
-
-
-
- + +
@@ -207,100 +47,7 @@ export function TemplatesSection({ onSaveSnippet }: TemplatesSectionProps) { category="templates" onSaveSnippet={onSaveSnippet} > - -
-
-
-
-

ProductName

-
-
- - - - -
-
-
- -
- New Release -

- Build Amazing Products Faster -

-

- The complete toolkit for modern product development. Ship faster with our - component library and design system. -

-
- - -
-
- -
-
-

Features

-

- Everything you need to build production-ready applications -

-
- -
- -
- -
-

Analytics

-

- Track and analyze your product metrics in real-time -

-
- - -
- -
-

Collaboration

-

- Work together with your team seamlessly -

-
- - -
- -
-

Customizable

-

- Adapt the platform to your specific needs -

-
-
-
- -
-

Ready to get started?

-

- Join thousands of teams already building with our platform -

- -
- +
@@ -312,88 +59,15 @@ export function TemplatesSection({ onSaveSnippet }: TemplatesSectionProps) {

- -
-
-
-

Store

-
- - -
-
-
- - - U - -
-
-
- -
-
-
-
-
- {[1, 2, 3, 4].map((i) => ( -
- ))} -
-
- -
-
- New Arrival -

Premium Product Name

-
- $299.00 - - $399.00 - -
-
- - - -
-

Description

-

- Experience premium quality with this exceptional product. Crafted with - attention to detail and designed for those who demand excellence. -

-
- -
-

Features

-
    -
  • • Premium materials and construction
  • -
  • • Industry-leading performance
  • -
  • • 2-year warranty included
  • -
  • • Free shipping on orders over $50
  • -
-
- - - -
- - -
-
-
-
- + + +
@@ -404,97 +78,15 @@ export function TemplatesSection({ onSaveSnippet }: TemplatesSectionProps) {

- -
-
-

Blog

-
- - - -
-
-
- -
-
-
-
- Design - Tutorial -
-

- Building a Comprehensive Component Library -

-
- - - AW - -
-

Alex Writer

-

- March 15, 2024 · 10 min read -

-
-
-
- - - -
-
- -

- Design systems have become an essential part of modern product development. - They provide consistency, improve efficiency, and create a shared language - between designers and developers. -

- -

- Understanding Atomic Design -

-

- The atomic design methodology consists of five distinct stages: atoms, - molecules, organisms, templates, and pages. Each stage builds upon the - previous, creating a comprehensive system that scales with your needs. -

- - -

- "A design system is never complete. It's a living, breathing ecosystem - that evolves with your product and team." -

-
- -

Getting Started

-

- Begin by identifying the core components your product needs. Start small - with basic atoms like buttons and inputs, then gradually build up to more - complex organisms and templates. -

-
- - - -
- - -
-
-
- + + +
)