mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
b44dd02b8a
* style(3000): Refine sidebar style * Remove extraneous class * Use slightly darker `border-3000-light` * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Improve sidebar scrolling experience * Fix logo colors in dark mode * Update UI snapshots for `webkit` (2) * Update UI snapshots for `webkit` (2) * Make border color translucent * Update UI snapshots for `chromium` (1) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
21 lines
645 B
TypeScript
21 lines
645 B
TypeScript
import { useMountedLogic } from 'kea'
|
|
import { FEATURE_FLAGS } from 'lib/constants'
|
|
import { useEffect } from 'react'
|
|
import { themeLogic } from '~/layout/navigation-3000/themeLogic'
|
|
import { useFeatureFlags } from '~/mocks/browser'
|
|
import type { DecoratorFn } from '@storybook/react'
|
|
|
|
/** Activate PostHog 3000. */
|
|
export const with3000: DecoratorFn = (Story) => {
|
|
useFeatureFlags([FEATURE_FLAGS.POSTHOG_3000])
|
|
useMountedLogic(themeLogic)
|
|
useEffect(() => {
|
|
document.body.classList.add('posthog-3000')
|
|
return () => {
|
|
document.body.classList.remove('posthog-3000')
|
|
}
|
|
})
|
|
|
|
return <Story />
|
|
}
|