Last active
May 31, 2020 16:05
-
-
Save grommett/0fb775b0220974a5bec55aa8570ad232 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const exportModal = Machine({ | |
id: 'exportModal', | |
initial: 'closed', | |
states: { | |
closed: { | |
on: { | |
OPEN: 'opened' | |
} | |
}, | |
opened: { | |
on: { | |
CLOSE: 'closed', | |
CANCEL: 'closed' | |
}, | |
id: 'export', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
EXPORT: 'export' | |
} | |
}, | |
export: { | |
on: { | |
SUCCESS: 'success', | |
FAIL: 'fail' | |
} | |
}, | |
success: 'success', | |
fail: 'fail' | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment