import React from "react"
import { storiesOf as _storiesOf } from "@storybook/react"
import { Boot } from "Router/Boot"

const bootProps = {
  mediator: x => x,
}

export function storiesOf(desc, mod) {
  return _storiesOf(desc, mod).addDecorator(storyFn => {
    return <Boot {...bootProps}>{storyFn()}</Boot>
  })
}

@@ -112,16 +112,88 @@
 er/Boot%22
+%0Aimport track from 'react-tracking'%0Aimport Events from %22../Utils/Events%22
 %0A%0Aconst 
@@ -383,8 +383,429 @@
 %0A  %7D)%0A%7D%0A
+%0A// Wrap publishing sub-component stories so tracking events log%0A@track(%7B%7D, %7B%0A  dispatch: data =%3E Events.postEvent(data)%0A%7D)%0Aclass PublishingBoot extends React.Component %7B%0A  render() %7B%0A    return this.props.children%0A  %7D%0A%7D%0A%0Aexport function storiesOfPublishing(desc, mod) %7B%0A  return _storiesOf(desc, mod).addDecorator(storyFn =%3E %7B%0A    return (%0A      %3CPublishingBoot%3E%0A        %7BstoryFn()%7D%0A      %3C/PublishingBoot%3E%0A    )%0A  %7D)%0A%7D%0A

add storiesOfPublishing for tracking logging