Skip to content

Instantly share code, notes, and snippets.

@grommett
Last active May 31, 2020 16:05
Show Gist options
  • Save grommett/0fb775b0220974a5bec55aa8570ad232 to your computer and use it in GitHub Desktop.
Save grommett/0fb775b0220974a5bec55aa8570ad232 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// 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