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

Function FAQItem

packages/shared/src/components/plus/PlusFAQ.tsx:21–48  ·  view source on GitHub ↗
({ item }: { item: FAQ })

Source from the content-addressed store, hash-verified

19}
20
21const FAQItem = ({ item }: { item: FAQ }): ReactElement => {
22 const { logEvent } = useLogContext();
23 const handleClick = () => {
24 logEvent({
25 event_name: LogEvent.ClickPlusFaq,
26 target_id: item.question,
27 });
28 };
29
30 return (
31 <div className="rounded-10 bg-surface-float px-6 py-4">
32 <Accordion
33 onClick={handleClick}
34 title={
35 <Typography
36 bold
37 color={TypographyColor.Primary}
38 tag={TypographyTag.Span}
39 >
40 {item.question}
41 </Typography>
42 }
43 >
44 <div className="text-text-tertiary typo-callout">{item.answer}</div>
45 </Accordion>
46 </div>
47 );
48};
49
50export const PlusFAQ = (): ReactElement => {
51 const id = useId();

Callers

nothing calls this directly

Calls 1

useLogContextFunction · 0.90

Tested by

no test coverage detected