Last active
February 15, 2020 13:16
-
-
Save mi5ha/28e78b447d0295bf8dc77219e65f7432 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
const wordMachine = Machine({ | |
id: 'word', | |
type: 'parallel', | |
states: { | |
bold: { | |
initial: 'off', | |
states: { | |
on: { | |
on: { TOGGLE_BOLD: 'off' } | |
}, | |
off: { | |
on: { TOGGLE_BOLD: 'on' } | |
} | |
} | |
}, | |
underline: { | |
initial: 'off', | |
states: { | |
on: { | |
on: { TOGGLE_UNDERLINE: 'off' } | |
}, | |
off: { | |
on: { TOGGLE_UNDERLINE: 'on' } | |
} | |
} | |
}, | |
italics: { | |
initial: 'off', | |
states: { | |
on: { | |
on: { TOGGLE_ITALICS: 'off' } | |
}, | |
off: { | |
on: { TOGGLE_ITALICS: 'on' } | |
} | |
} | |
}, | |
list: { | |
initial: 'none', | |
states: { | |
none: { | |
on: { BULLETS: 'bullets', NUMBERS: 'numbers' } | |
}, | |
bullets: { | |
on: { NONE: 'none', NUMBERS: 'numbers' } | |
}, | |
numbers: { | |
on: { BULLETS: 'bullets', NONE: 'none' } | |
} | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment