import * as React from 'react' import type { StoryFn, Meta } from '@storybook/react-webpack5' import { ProductSwitcherBridge } from './product-switcher-bridge' import { NavigationBar } from '.' import styled from 'styled-components' import { spacingPx, text } from '@planview/pv-utilities' import { ToolbarSectionLeft } from '../section' import { LogoAgilePlace } from '../logos' const Header = styled.label` ${text.title}; padding-left: ${spacingPx.small}; ` export default { title: 'pv-toolbar/NavigationBar/ProductSwitcherBridge', tags: ['autodocs'], component: ProductSwitcherBridge, parameters: { badges: ['intl'], }, } satisfies Meta export const Default: StoryFn = () => { const ref = React.useRef(null) React.useEffect(() => { if (ref.current) { /* This is where you would initialize the Dovetail component and pass it the `ref.current` as its element */ const button = document.createElement('button') button.setAttribute('aria-controls', 'app-switcher-list') button.tabIndex = -1 button.innerHTML = 'Product Switcher' ref.current.appendChild(button) } }, []) return ( } logo={} >
Example Application
) }