Skip to content

Commit

Permalink
Move TabHeader and TabPanel components to a common location
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Nov 29, 2023
1 parent 5f0e7b7 commit 247f7ef
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/sidebar/components/HelpPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { VersionData } from '../helpers/version-data';
import { withServices } from '../service-context';
import type { SessionService } from '../services/session';
import { useSidebarStore } from '../store';
import TabHeader from './ShareDialog/TabHeader';
import TabPanel from './ShareDialog/TabPanel';
import SidebarPanel from './SidebarPanel';
import Tutorial from './Tutorial';
import VersionInfo from './VersionInfo';
import TabHeader from './tabs/TabHeader';
import TabPanel from './tabs/TabPanel';

type HelpPanelTabProps = {
/** What the tab's link should say. */
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar/components/ShareDialog/ShareDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useState } from 'preact/hooks';

import { useSidebarStore } from '../../store';
import SidebarPanel from '../SidebarPanel';
import TabHeader from '../tabs/TabHeader';
import TabPanel from '../tabs/TabPanel';
import ExportAnnotations from './ExportAnnotations';
import ImportAnnotations from './ImportAnnotations';
import ShareAnnotations from './ShareAnnotations';
import TabHeader from './TabHeader';
import TabPanel from './TabPanel';

export type ShareDialogProps = {
/** If true, the share tab will be rendered. Defaults to false */
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar/components/ShareDialog/test/ShareDialog-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('ShareDialog', () => {
$imports.$mock(mockImportedComponents());
// Don't mock these related components for now
$imports.$restore({
'./TabHeader': true,
'./TabPanel': true,
'../tabs/TabHeader': true,
'../tabs/TabPanel': true,
});
$imports.$mock({
'../../store': { useSidebarStore: () => fakeStore },
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/sidebar/components/test/HelpPanel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ describe('HelpPanel', () => {
});
$imports.$restore({
// Rendering TabHeader and TabPanel is needed for a11y tests
'./ShareDialog/TabHeader': true,
'./ShareDialog/TabPanel': true,
'./tabs/TabHeader': true,
'./tabs/TabPanel': true,
});
});

Expand Down

0 comments on commit 247f7ef

Please sign in to comment.