mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 15:53:46 +00:00
e8a403e342
* Following up on the work from Idf90ee2a0f1c1d08a31cf50099c0bebc7b67e619, this commit renames the storybook files/storybook names to their respective component name. e.g. personalNavigation.stories.js => PersonalMenu.stories.js Bug: T243281 Change-Id: I68054663c5a597f90a826b6f75bf399382dca609
40 lines
1.7 KiB
JavaScript
40 lines
1.7 KiB
JavaScript
import navTemplate from '!!raw-loader!../includes/templates/Navigation.mustache';
|
|
import { PERSONAL_MENU_TEMPLATE_DATA, personalMenuTemplate } from './PersonalMenu.stories.data';
|
|
import { pageActionsData, namespaceTabsData, vectorTabsTemplate } from './VectorTabs.stories.data';
|
|
import { vectorMenuTemplate, moreData, variantsData } from './VectorMenu.stories.data';
|
|
import { searchBoxData, searchBoxTemplate } from './SearchBox.stories.data';
|
|
import { SIDEBAR_DATA, SIDEBAR_TEMPLATE_PARTIALS, sidebarTemplate } from './Sidebar.stories.data';
|
|
|
|
export const NAVIGATION_TEMPLATE_PARTIALS = Object.assign( {}, SIDEBAR_TEMPLATE_PARTIALS, {
|
|
SearchBox: searchBoxTemplate,
|
|
Sidebar: sidebarTemplate,
|
|
VectorTabs: vectorTabsTemplate,
|
|
VectorMenu: vectorMenuTemplate,
|
|
PersonalMenu: personalMenuTemplate
|
|
} );
|
|
|
|
export const NAVIGATION_TEMPLATE_DATA = {
|
|
loggedOutWithVariants: {
|
|
'data-personal-menu': PERSONAL_MENU_TEMPLATE_DATA.loggedOut,
|
|
'data-namespace-tabs': namespaceTabsData,
|
|
'data-page-actions': pageActionsData,
|
|
'data-variants': variantsData,
|
|
'data-search-box': searchBoxData,
|
|
'data-sidebar': SIDEBAR_DATA.withPortals,
|
|
'html-navigation-heading': 'Navigation menu',
|
|
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
|
},
|
|
loggedInWithMoreActions: {
|
|
'data-personal-menu': PERSONAL_MENU_TEMPLATE_DATA.loggedInWithEcho,
|
|
'data-namespace-tabs': namespaceTabsData,
|
|
'data-page-actions': pageActionsData,
|
|
'data-page-actions-more': moreData,
|
|
'data-search-box': searchBoxData,
|
|
'data-sidebar': SIDEBAR_DATA.withPortals,
|
|
'html-navigation-heading': 'Navigation menu',
|
|
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
|
}
|
|
};
|
|
|
|
export { navTemplate };
|