0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/.storybook/preview.js
Marius Andra 528f7d0dda
Storybook API connection toolbar (#5871)
* basic api selector toolbar

* api history
2021-09-11 00:34:15 +02:00

26 lines
619 B
JavaScript

import React from 'react'
import { getContext } from 'kea'
import { loadPostHogJS } from '~/loadPostHogJS'
import '~/styles'
import { withApi } from './ApiSelector/withApi'
loadPostHogJS()
window.getReduxState = () => getContext().store.getState()
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
options: {
// opt in to panels in your story by overridding `export const parameters`
showPanel: false,
},
}
export const decorators = [withApi]