MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / FeatureSection

Function FeatureSection

web/src/components/ui/landing/feature/index.tsx:82–195  ·  view source on GitHub ↗
({
  title,
  description,
  backdropColor = BlockColor.DarkForestGreen,
  imagePosition = 'right',
  tagline,
  decorativeColors = [BlockColor.GenerativeGreen, BlockColor.DarkForestGreen],
  highlightText,
  highlightIcon,
  illustration,
  learnMoreText = 'Learn More',
  learnMoreLink,
  textColor,
}: FeatureSectionProps)

Source from the content-addressed store, hash-verified

80}
81
82export function FeatureSection({
83 title,
84 description,
85 backdropColor = BlockColor.DarkForestGreen,
86 imagePosition = 'right',
87 tagline,
88 decorativeColors = [BlockColor.GenerativeGreen, BlockColor.DarkForestGreen],
89 highlightText,
90 highlightIcon,
91 illustration,
92 learnMoreText = 'Learn More',
93 learnMoreLink,
94 textColor,
95}: FeatureSectionProps) {
96 const isLight =
97 backdropColor === BlockColor.CRTAmber ||
98 backdropColor === BlockColor.TerminalYellow
99 const isMobile = useIsMobile()
100
101 const renderContent = () => (
102 <div className="space-y-6">
103 <div>
104 <h2 className="feature-heading">{title}</h2>
105
106 <span className="text-xs font-semibold uppercase tracking-wider mt-2 inline-block opacity-70">
107 {tagline}
108 </span>
109 </div>
110
111 <HighlightText text={highlightText} isLight={isLight} icon={highlightIcon} />
112
113 <p className="text-lg leading-relaxed opacity-70 font-paragraph">
114 {description}
115 </p>
116
117 <LearnMoreLink
118 href={learnMoreLink}
119 text={learnMoreText}
120 isLight={isLight}
121 textColor={textColor}
122 />
123 </div>
124 )
125
126 return (
127 <Section background={backdropColor}>
128 <div
129 className={cn(
130 'text-white max-w-7xl mx-auto px-4 sm:px-6 lg:px-8',
131 { 'text-black': isLight },
132 textColor,
133 )}
134 >
135 <div
136 className={cn(
137 'grid gap-8 items-center',
138 isMobile ? 'grid-cols-1' : 'lg:grid-cols-2 lg:gap-16',
139 )}

Callers

nothing calls this directly

Calls 3

useIsMobileFunction · 0.90
cnFunction · 0.90
renderContentFunction · 0.70

Tested by

no test coverage detected