feat: Add dedicated default loading component

* add option to pass a transition name

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-20 18:22:30 +01:00
parent 4e8ff6201a
commit 668fed1dc4
6 changed files with 137 additions and 65 deletions
+15 -1
View File
@@ -78,6 +78,20 @@ export type FitViewFunc = (fitViewOptions?: FitViewParams) => void
export type ProjectFunc = (position: XYPosition) => XYPosition
export type ToObjectFunc<T = any> = () => FlowExportObject<T>
export type Loading =
| {
label: string
transition?:
| string
| {
name: string
mode: string
}
style: CSSProperties
class: string
}
| boolean
export type FlowInstance<T = any> = {
zoomIn: () => void
zoomOut: () => void
@@ -126,5 +140,5 @@ export interface FlowOptions {
zoomOnDoubleClick?: boolean
edgeUpdaterRadius?: number
storageKey?: string
showLoadingIndicator?: boolean
loading?: Loading
}