cfahlgren1 HF staff commited on
Commit
91d7c85
1 Parent(s): e9c0734

add category status

Browse files
components/CategoryCard.tsx CHANGED
@@ -9,14 +9,15 @@ const CategoryCard: React.FC<CategoryCardProps> = ({
9
  icon: Icon,
10
  colorName,
11
  description,
12
- isNew,
13
  graphic: Graphic
14
  }) => {
15
  const { text, gradient, iconBg } = getColorConfig(colorName);
 
16
 
17
  return (
18
  <div className={`bg-gradient-to-br ${gradient} rounded-xl p-4 text-white w-92 h-[380px] flex flex-col relative shadow-lg transition-transform duration-300 ease-in-out hover:scale-105`}>
19
- {isNew && (
20
  <div className={`absolute top-2 right-2 ${iconBg} ${text} text-xs font-bold py-1 px-2 rounded-full`}>
21
  New
22
  </div>
@@ -31,8 +32,13 @@ const CategoryCard: React.FC<CategoryCardProps> = ({
31
  <Graphic />
32
  </div>
33
  <p className="text-xs mb-3 leading-tight">{description}</p>
34
- <button className={`w-full bg-white ${text} py-2 px-3 rounded-lg text-sm font-semibold hover:bg-opacity-90 transition-colors mt-auto`}>
35
- View Tools
 
 
 
 
 
36
  </button>
37
  </div>
38
  );
 
9
  icon: Icon,
10
  colorName,
11
  description,
12
+ status,
13
  graphic: Graphic
14
  }) => {
15
  const { text, gradient, iconBg } = getColorConfig(colorName);
16
+ const isComingSoon = status === 'Coming Soon';
17
 
18
  return (
19
  <div className={`bg-gradient-to-br ${gradient} rounded-xl p-4 text-white w-92 h-[380px] flex flex-col relative shadow-lg transition-transform duration-300 ease-in-out hover:scale-105`}>
20
+ {(status === 'New' || status === 'Coming Soon') && (
21
  <div className={`absolute top-2 right-2 ${iconBg} ${text} text-xs font-bold py-1 px-2 rounded-full`}>
22
  New
23
  </div>
 
32
  <Graphic />
33
  </div>
34
  <p className="text-xs mb-3 leading-tight">{description}</p>
35
+ <button
36
+ className={`w-full bg-white ${text} py-2 px-3 rounded-lg text-sm font-semibold transition-colors mt-auto ${
37
+ isComingSoon ? 'opacity-50 cursor-not-allowed' : 'hover:bg-opacity-90'
38
+ }`}
39
+ disabled={isComingSoon}
40
+ >
41
+ {isComingSoon ? 'Coming Soon' : 'View Tools'}
42
  </button>
43
  </div>
44
  );
lib/categories.tsx CHANGED
@@ -11,7 +11,7 @@ export const categories: Category[] = [
11
  title: "Segment",
12
  icon: Scissors,
13
  description: "Break down images into distinct segments based on the object or background.",
14
- isNew: true,
15
  colorName: "indigo",
16
  graphic: SegmentationIcon
17
  },
@@ -19,6 +19,7 @@ export const categories: Category[] = [
19
  title: "Embed",
20
  icon: Sparkles,
21
  description: "Create vector embeddings for text and images.",
 
22
  colorName: "teal",
23
  graphic: EmbeddingIcon
24
  },
@@ -26,6 +27,7 @@ export const categories: Category[] = [
26
  title: "Transcribe",
27
  icon: Mic,
28
  description: "Convert speech to text with high accuracy using advanced AI-powered transcription (Whisper).",
 
29
  colorName: "rose",
30
  graphic: TranscriptionIcon
31
  },
@@ -33,6 +35,7 @@ export const categories: Category[] = [
33
  title: "Sentiment",
34
  icon: Smile,
35
  description: "Analyze text to determine the emotional tone and attitude, classifying it as positive, negative, or neutral.",
 
36
  colorName: "amber",
37
  graphic: SentimentAnalysisIcon
38
  }
 
11
  title: "Segment",
12
  icon: Scissors,
13
  description: "Break down images into distinct segments based on the object or background.",
14
+ status: "Coming Soon",
15
  colorName: "indigo",
16
  graphic: SegmentationIcon
17
  },
 
19
  title: "Embed",
20
  icon: Sparkles,
21
  description: "Create vector embeddings for text and images.",
22
+ status: "Coming Soon",
23
  colorName: "teal",
24
  graphic: EmbeddingIcon
25
  },
 
27
  title: "Transcribe",
28
  icon: Mic,
29
  description: "Convert speech to text with high accuracy using advanced AI-powered transcription (Whisper).",
30
+ status: "Coming Soon",
31
  colorName: "rose",
32
  graphic: TranscriptionIcon
33
  },
 
35
  title: "Sentiment",
36
  icon: Smile,
37
  description: "Analyze text to determine the emotional tone and attitude, classifying it as positive, negative, or neutral.",
38
+ status: "Coming Soon",
39
  colorName: "amber",
40
  graphic: SentimentAnalysisIcon
41
  }
types/categories.ts CHANGED
@@ -1,10 +1,12 @@
1
  import type { LucideIcon } from 'lucide-react';
2
 
 
 
3
  export interface Category {
4
  title: string;
5
  icon: LucideIcon;
6
  description: string;
7
- isNew?: boolean;
8
  colorName: string;
9
  graphic: React.ComponentType<React.SVGProps<SVGSVGElement>>;
10
- };
 
1
  import type { LucideIcon } from 'lucide-react';
2
 
3
+ export type CategoryStatus = 'New' | 'Coming Soon' | 'Available';
4
+
5
  export interface Category {
6
  title: string;
7
  icon: LucideIcon;
8
  description: string;
9
+ status: CategoryStatus;
10
  colorName: string;
11
  graphic: React.ComponentType<React.SVGProps<SVGSVGElement>>;
12
+ }