'use client' import * as React from 'react' import { Check } from 'lucide-react' import { cn } from '@/lib/utils' import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog" import { templates } from '@/config/wechat-templates' import { Button } from "@/components/ui/button" interface WechatStylePickerProps { value?: string onSelect: (value: string) => void } export function WechatStylePicker({ value, onSelect }: WechatStylePickerProps) { const [open, setOpen] = React.useState(false) return ( 选择样式模板
{templates.map((template) => (
{ onSelect(template.id) setOpen(false) }} >

{template.id === 'smartisan' ? '锤子便签风格' : '标题示例'}

{template.id === 'smartisan' ? '这是锤子便签的经典样式,保持了简约、优雅的设计风格。文字的排版和间距都经过精心调整,让阅读体验更加舒适。' : '这是一段示例文本,展示不同样式模板的效果。' }

{template.id === 'smartisan' ? '保持简单,保持优雅' : '引用文本示例' }
{template.id === 'smartisan' && (
  • 精心设计的字体
  • 舒适的行间距
)}

{template.name}

{template.description}

{value === template.id && (
)}
))}
) }