MCPcopy
hub / github.com/PostHog/posthog / ExportButton

Function ExportButton

frontend/src/lib/components/ExportButton/ExportButton.tsx:18–54  ·  view source on GitHub ↗
({ items, ...buttonProps }: ExportButtonProps)

Source from the content-addressed store, hash-verified

16}
17
18export function ExportButton({ items, ...buttonProps }: ExportButtonProps): JSX.Element {
19 return (
20 <LemonButtonWithPopup
21 status="stealth"
22 data-attr="export-button"
23 {...buttonProps}
24 popup={{
25 actionable: true,
26 placement: 'right-start',
27 closeParentPopupOnClickInside: true,
28 overlay: (
29 <>
30 <h5>File type</h5>
31 <LemonDivider />
32 {items.map(({ title, ...triggerExportProps }, i) => {
33 const exportFormatExtension = triggerExportProps.export_format.split('/').pop()
34
35 return (
36 <LemonButton
37 key={i}
38 fullWidth
39 status="stealth"
40 onClick={() => triggerExport(triggerExportProps)}
41 data-attr={`export-button-${exportFormatExtension}`}
42 >
43 {title ? title : `.${exportFormatExtension}`}
44 </LemonButton>
45 )
46 })}
47 </>
48 ),
49 }}
50 >
51 Export
52 </LemonButtonWithPopup>
53 )
54}

Callers

nothing calls this directly

Calls 2

triggerExportFunction · 0.90
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…