refactor!: rename Command Menu page/navigation layer to Side Panel (#18393)
This commit is contained in:
+5
-5
@@ -6,7 +6,7 @@ describe('getPageLayoutVerticalListViewerVariant', () => {
|
||||
getPageLayoutVerticalListViewerVariant({
|
||||
isInPinnedTab: true,
|
||||
isMobile: false,
|
||||
isInRightDrawer: false,
|
||||
isInSidePanel: false,
|
||||
}),
|
||||
).toBe('side-column');
|
||||
});
|
||||
@@ -16,17 +16,17 @@ describe('getPageLayoutVerticalListViewerVariant', () => {
|
||||
getPageLayoutVerticalListViewerVariant({
|
||||
isInPinnedTab: false,
|
||||
isMobile: true,
|
||||
isInRightDrawer: false,
|
||||
isInSidePanel: false,
|
||||
}),
|
||||
).toBe('side-column');
|
||||
});
|
||||
|
||||
it('should return side-column when isInRightDrawer is true', () => {
|
||||
it('should return side-column when isInSidePanel is true', () => {
|
||||
expect(
|
||||
getPageLayoutVerticalListViewerVariant({
|
||||
isInPinnedTab: false,
|
||||
isMobile: false,
|
||||
isInRightDrawer: true,
|
||||
isInSidePanel: true,
|
||||
}),
|
||||
).toBe('side-column');
|
||||
});
|
||||
@@ -36,7 +36,7 @@ describe('getPageLayoutVerticalListViewerVariant', () => {
|
||||
getPageLayoutVerticalListViewerVariant({
|
||||
isInPinnedTab: false,
|
||||
isMobile: false,
|
||||
isInRightDrawer: false,
|
||||
isInSidePanel: false,
|
||||
}),
|
||||
).toBe('default');
|
||||
});
|
||||
|
||||
+3
-3
@@ -3,15 +3,15 @@ import { type PageLayoutVerticalListViewerVariant } from '@/page-layout/types/Pa
|
||||
type GetPageLayoutVerticalListViewerVariantParams = {
|
||||
isInPinnedTab: boolean;
|
||||
isMobile: boolean;
|
||||
isInRightDrawer: boolean;
|
||||
isInSidePanel: boolean;
|
||||
};
|
||||
|
||||
export const getPageLayoutVerticalListViewerVariant = ({
|
||||
isInPinnedTab,
|
||||
isMobile,
|
||||
isInRightDrawer,
|
||||
isInSidePanel,
|
||||
}: GetPageLayoutVerticalListViewerVariantParams): PageLayoutVerticalListViewerVariant => {
|
||||
if (isInPinnedTab || isMobile || isInRightDrawer) {
|
||||
if (isInPinnedTab || isMobile || isInSidePanel) {
|
||||
return 'side-column';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user