()
| 86 | } |
| 87 | |
| 88 | export function ButtonExamples() { |
| 89 | const [isLoading, setIsLoading] = useState(false) |
| 90 | const [likedButtons, setLikedButtons] = useState<Set<string>>(new Set()) |
| 91 | |
| 92 | const handleLoadingDemo = () => { |
| 93 | setIsLoading(true) |
| 94 | setTimeout(() => setIsLoading(false), 2000) |
| 95 | } |
| 96 | |
| 97 | const handleLike = (buttonId: string) => { |
| 98 | setLikedButtons((prev) => { |
| 99 | const newSet = new Set(prev) |
| 100 | if (newSet.has(buttonId)) { |
| 101 | newSet.delete(buttonId) |
| 102 | } else { |
| 103 | newSet.add(buttonId) |
| 104 | } |
| 105 | return newSet |
| 106 | }) |
| 107 | } |
| 108 | |
| 109 | return ( |
| 110 | <div className="card p-8 space-y-12"> |
| 111 | <motion.div |
| 112 | animate={{ opacity: 1, y: 0 }} |
| 113 | className="text-center max-w-3xl mx-auto" |
| 114 | initial={{ opacity: 0, y: 20 }} |
| 115 | transition={softSpringPreset} |
| 116 | > |
| 117 | <h4 className="heading-3 text-text mb-4">Button System</h4> |
| 118 | <p className="text-text-secondary text-lg leading-relaxed mb-6"> |
| 119 | A comprehensive button system showcasing our OKLCH color palette with |
| 120 | semantic variants, sizes, and interactive states designed for optimal |
| 121 | user experience. |
| 122 | </p> |
| 123 | <div className="h-1 w-24 bg-gradient-to-r from-accent to-accent/50 rounded-full mx-auto" /> |
| 124 | </motion.div> |
| 125 | |
| 126 | <div className="space-y-12"> |
| 127 | {/* Button Variants */} |
| 128 | <motion.section |
| 129 | animate={{ opacity: 1, y: 0 }} |
| 130 | className="space-y-6" |
| 131 | initial={{ opacity: 0, y: 20 }} |
| 132 | transition={{ ...softSpringPreset, delay: 0.1 }} |
| 133 | > |
| 134 | <div className="flex items-center gap-4"> |
| 135 | <h5 className="heading-4 text-text">Semantic Variants</h5> |
| 136 | <div className="flex-1 h-px bg-border" /> |
| 137 | </div> |
| 138 | <p className="text-text-secondary"> |
| 139 | Five semantic button variants covering all common use cases in |
| 140 | modern applications. |
| 141 | </p> |
| 142 | <div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4"> |
| 143 | <Button variant="primary">Primary</Button> |
| 144 | <Button variant="secondary">Secondary</Button> |
| 145 | <Button variant="outline">Outline</Button> |
nothing calls this directly
no test coverage detected