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

Function SquadTourCard

packages/shared/src/components/squads/SquadTourCard.tsx:22–73  ·  view source on GitHub ↗
({
  banner,
  bannerAsBg,
  title,
  description,
  badge,
  children,
  className,
}: SquadTourCardProps)

Source from the content-addressed store, hash-verified

20}
21
22function SquadTourCard({
23 banner,
24 bannerAsBg,
25 title,
26 description,
27 badge,
28 children,
29 className,
30}: SquadTourCardProps): ReactElement {
31 return (
32 <FlexCol className={className?.container}>
33 <FlexCol
34 className={classNames(
35 'relative',
36 !bannerAsBg &&
37 'h-80 items-center justify-center bg-gradient-to-l from-raw-cabbage-90 to-raw-cabbage-50',
38 )}
39 >
40 {bannerAsBg ? (
41 <div
42 className={classNames('w-full', className?.banner)}
43 style={{ backgroundImage: `url(${banner})` }}
44 />
45 ) : (
46 <img
47 className={classNames(
48 'w-full max-w-[23.5rem] pt-14',
49 className?.banner,
50 )}
51 src={banner}
52 alt={`${title} banner`}
53 />
54 )}
55 </FlexCol>
56 <FlexCol className="p-6">
57 <h3
58 className={classNames(
59 'flex flex-row items-center font-bold',
60 description ? 'typo-title3' : 'typo-title1',
61 )}
62 >
63 {typeof badge === 'string' ? <Badge>{badge}</Badge> : badge}
64 {title}
65 </h3>
66 {description && (
67 <p className="mt-2 text-text-secondary typo-body">{description}</p>
68 )}
69 </FlexCol>
70 {children}
71 </FlexCol>
72 );
73}
74
75export default SquadTourCard;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected