MCPcopy Create free account
hub / github.com/dailydotdev/apps / DetailCard

Function DetailCard

packages/shared/src/components/help/HelpWidget.tsx:239–365  ·  view source on GitHub ↗
({
  activeItem,
  activeIndex,
  itemCount,
  showNav,
  onCtaClick,
  onDismiss,
  onNext,
  onPrev,
  onGoToIndex,
}: DetailCardProps)

Source from the content-addressed store, hash-verified

237}
238
239function DetailCard({
240 activeItem,
241 activeIndex,
242 itemCount,
243 showNav,
244 onCtaClick,
245 onDismiss,
246 onNext,
247 onPrev,
248 onGoToIndex,
249}: DetailCardProps): ReactElement {
250 const { title, description, image, tagText, tagColor, ctaText, ctaUrl } =
251 activeItem.flags;
252
253 return (
254 <div
255 className={classNames(
256 styles.card,
257 'relative w-80 overflow-hidden rounded-16 border border-border-subtlest-tertiary',
258 'bg-background-popover shadow-2',
259 )}
260 >
261 <div className={styles.accentBar} />
262
263 <Button
264 size={ButtonSize.XSmall}
265 variant={ButtonVariant.Tertiary}
266 icon={<MiniCloseIcon />}
267 className="absolute right-3 top-4 z-1 flex-shrink-0"
268 onClick={(e: React.MouseEvent) => {
269 e.stopPropagation();
270 onDismiss();
271 }}
272 aria-label="Close"
273 />
274
275 {image && (
276 <CardCover
277 imageProps={{
278 loading: 'lazy',
279 alt: title,
280 src: image,
281 className: 'h-32 w-full object-cover',
282 }}
283 />
284 )}
285
286 <div className="relative px-5 pb-2 pt-6">
287 <div className="flex items-center gap-3">
288 <div className="relative flex-shrink-0">
289 <div className={styles.iconGlow} />
290 <div className="relative flex size-10 items-center justify-center rounded-12 bg-surface-hover">
291 <SparkleIcon className="size-6 text-text-link" />
292 </div>
293 </div>
294 {tagText && (
295 <Pill
296 label={tagText}

Callers

nothing calls this directly

Calls 1

onDismissFunction · 0.50

Tested by

no test coverage detected