source: chapterx-frontend/src/components/story/GenreBadge.tsx

main
Last change on this file was b62cefc, checked in by kikisrbinoska <srbinoskakristina07@…>, 4 months ago

Added frontend and imporoved AI Suggestions service

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[b62cefc]1import React from 'react'
2import { GenreBadge as GenreBadgeUI } from '../ui/Badge'
3
4interface GenreBadgeProps {
5 genre: string
6 onClick?: () => void
7}
8
9export const GenreBadge: React.FC<GenreBadgeProps> = ({ genre, onClick }) => (
10 <GenreBadgeUI genre={genre} onClick={onClick} />
11)
12
13export function getGenreGradient(genre: string): string {
14 const gradients: Record<string, string> = {
15 Fantasy: 'from-purple-900 via-indigo-900 to-indigo-800',
16 'Sci-Fi': 'from-cyan-900 via-blue-900 to-blue-800',
17 Romance: 'from-pink-900 via-rose-900 to-rose-800',
18 'Historical Fiction': 'from-amber-900 via-orange-900 to-orange-800',
19 Adventure: 'from-green-900 via-emerald-900 to-emerald-800',
20 Thriller: 'from-gray-900 via-slate-800 to-slate-700',
21 Mystery: 'from-violet-900 via-purple-900 to-purple-800',
22 Horror: 'from-red-900 via-rose-900 to-slate-900',
23 Contemporary: 'from-blue-900 via-indigo-900 to-slate-800',
24 Poetry: 'from-rose-900 via-pink-900 to-pink-800',
25 }
26 return gradients[genre] || 'from-indigo-900 via-violet-900 to-violet-800'
27}
Note: See TracBrowser for help on using the repository browser.