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

Function PlusGrid

packages/shared/src/components/cards/plus/PlusGrid.tsx:35–116  ·  view source on GitHub ↗
({ flags, campaignId }: MarketingCta)

Source from the content-addressed store, hash-verified

33];
34
35const PlusGrid = ({ flags, campaignId }: MarketingCta) => {
36 const { logEvent } = useLogContext();
37 const { clearMarketingCta } = useBoot();
38
39 if (!flags) {
40 return null;
41 }
42 const { title, description, ctaText, ctaUrl } = flags;
43 const ctaColor = ButtonColor.Bacon;
44
45 const handleClose = () => {
46 logEvent({
47 event_name: LogEvent.MarketingCtaDismiss,
48 target_type: TargetType.PlusEntryCard,
49 target_id: campaignId,
50 });
51 clearMarketingCta(campaignId);
52 };
53
54 const handleClick = () => {
55 logEvent({
56 event_name: LogEvent.ClickPlusFeature,
57 target_type: TargetType.PlusEntryCard,
58 target_id: campaignId,
59 });
60 clearMarketingCta(campaignId);
61 };
62
63 return (
64 <div className="plus-entry-gradient relative overflow-hidden rounded-b-16 p-4 pb-6">
65 <div className="flex flex-col gap-4">
66 <div className="flex items-center justify-between">
67 <div className="flex items-center gap-2">
68 <div className="rounded-8 bg-action-plus-float p-1">
69 <DevPlusIcon className="fill-action-plus-default" />
70 </div>
71 <Typography
72 tag={TypographyTag.H3}
73 type={TypographyType.Title3}
74 bold
75 >
76 {title}
77 </Typography>
78 </div>
79 <CloseButton onClick={handleClose} />
80 </div>
81
82 <div className="flex flex-col gap-4">
83 <Typography
84 tag={TypographyTag.P}
85 type={TypographyType.Callout}
86 color={TypographyColor.Secondary}
87 >
88 {description}
89 </Typography>
90
91 <div className="flex w-full flex-col gap-1">
92 {bulletPointsControl.map((bulletPoint) => (

Callers

nothing calls this directly

Calls 2

useLogContextFunction · 0.90
useBootFunction · 0.90

Tested by

no test coverage detected