Fx Reference Popover
Type: React component
How to get FxReferencePopover?
JavaScript
import FxReferencePopover from 'fontoxml-fx/src/FxReferencePopover.jsx'
A component used for making a popover for references.
-
When the reference is resolving, the popover will show a loading state.
-
When an error occured while resolving the reference, the popover will show an error state.
-
When the reference is resolved a popoverBody can be determined based on this resolved reference.
-
The popover has a button to remove the reference and optional a button to edit the reference.
If the popover is for cross links consider using CrossReferencePopover instead. If the popover is for hyper links WebReferencePopover can be used.
Props
data
(Required)
Type: Object
The popoverData as provided by the family configuration, this only needs to be passed through.
Properties
toggle
Popover (Required)
Type: Function
A property that comes from the popover method self (see Create a popover), this only needs to be passed through.
open
Preview (Optional)
Type: Function
When used, this will open the preview for the reference.
Is called when the
openPreview
callback inrenderReference
is called.Arguments
render
Reference (Required)
Type: Function
Render the popoverBody based on the resolved reference.
Arguments
Returns
resolve
Reference (Optional)
Type: Function
This callback will be triggered when the popover is openend or after the permanent id is resolved (if the reference has permanent ids
data.targetIsPermanentId
).Arguments
Returns
Default value