message: demo(math): revert changes
diff: @@ -8,31 +8,32 @@ import { storiesOf } from '@storybook/react'
  import * as React from 'react'
  function MathEditorStory(props: Partial<MathEditorProps>) {
  - return (
  - <RootThemeProvider
  - theme={{ editor: defaultEditorTheme, renderer: defaultRendererTheme }}
  - >
  - <MathEditorExample {...props} />
  - </RootThemeProvider>
  - )
  -}
  -
  -function MathEditorExample(props: Partial<MathEditorProps>) {
  const [state, onChange] = React.useState(props.state || '')
  const [visual, setVisual] = React.useState(props.visual === true)
  const [inline, setInline] = React.useState(props.inline === true)
  return (
  + <RootThemeProvider
  + theme={{
  + editor: defaultEditorTheme,
  + renderer: defaultRendererTheme,
  + }}
  + >
  <MathEditor
  {...props}
  visual={visual}
  inline={inline}
  state={state}
  - onEditorChange={setVisual}
  - onInlineChange={setInline}
  + onEditorChange={(visual) => {
  + setVisual(visual)
  + }}
  + onInlineChange={(inline) => {
  + setInline(inline)
  + }}
  onChange={onChange}
  config={{}}
  />
  + </RootThemeProvider>
  )
  }
  @@ -67,7 +68,11 @@ storiesOf('Math', module)
  .add('MathEditor (block, focus on click)', () => {
  const [focused, setFocused] = React.useState(false)
  return (
  - <div onClick={() => setFocused(true)}>
  + <div
  + onClick={() => {
  + setFocused(true)
  + }}
  + >
  <MathEditorStory autofocus state="\sqrt{2}" readOnly={!focused} />
  </div>
  )
  @@ -75,7 +80,11 @@ storiesOf('Math', module)
  .add('MathEditor (block, visual, focus on click)', () => {
  const [focused, setFocused] = React.useState(false)
  return (
  - <div onClick={() => setFocused(true)}>
  + <div
  + onClick={() => {
  + setFocused(true)
  + }}
  + >
  <MathEditorStory
  autofocus
  state="\sqrt{2}"
  @@ -85,24 +94,3 @@ storiesOf('Math', module)
  </div>
  )
  })
  - .add('MathEditor (Overlay does not hide previous text)', () => {
  - return (
  - <RootThemeProvider
  - theme={{ editor: defaultEditorTheme, renderer: defaultRendererTheme }}
  - >
  - <p>
  - Consequatur quos vitae vel in. Suscipit a eius deserunt nisi neque.
  - Minima dolores quia quo veritatis. Aut natus nihil necessitatibus
  - delectus ea eligendi dolor sit. Neque deleniti vel sint laborum et
  - quia.
  - </p>
  -
  - <p>
  - Voluptatem similique perspiciatis earum eius fugit officiis ut et.
  - Numquam laudantium ut ipsum. Fugiat voluptatum dolores sit maiores.
  - </p>
  -
  - <MathEditorExample state="\sqrt{2}" visual />
  - </RootThemeProvider>
  - )
  - })
  