import {Fragment, useState} from 'react'; import styled from '@emotion/styled'; import Alert from 'sentry/components/alert'; import {Button} from 'sentry/components/button'; import JSXNode from 'sentry/components/stories/jsxNode'; import SizingWindow from 'sentry/components/stories/sizingWindow'; import storyBook from 'sentry/stories/storyBook'; import { DraggableTabBar, type Tab, } from 'sentry/views/issueList/groupSearchViewTabs/draggableTabBar'; import {IssueSortOptions} from 'sentry/views/issueList/utils'; const TabPanelContainer = styled('div')` width: 90%; height: 250px; background-color: white; `; const TABS: Tab[] = [ { id: 'one', key: 'one', label: 'Inbox', content: This is the Inbox view, queryCount: 1001, query: '', querySort: IssueSortOptions.DATE, }, { id: 'two', key: 'two', label: 'For Review', content: This is the For Review view, queryCount: 50, query: '', querySort: IssueSortOptions.DATE, }, { id: 'three', key: 'three', label: 'Regressed', content: This is the Regressed view, queryCount: 100, query: '', querySort: IssueSortOptions.DATE, }, ]; export default storyBook(DraggableTabBar, story => { story('Default', () => { const [showTempTab, setShowTempTab] = useState(false); const [tabs, setTabs] = useState(TABS); return ( This component is still a work in progress.

You should be using all of , ,{' '} , and components.

This will give you all kinds of accessibility and state tracking out of the box. But you will have to render all tab content, including hooks, upfront.

setShowTempTab(!showTempTab)}> Toggle Temporary View { setShowTempTab(false); }} orgSlug={'sentry'} router={{} as any} />
); }); }); const StyledButton = styled(Button)` justify-content: start; margin-bottom: 5px; `; const TabBarContainer = styled('div')` display: flex; justify-content: start; width: 90%; height: 300px; `;