mediawiki-skins-Vector/stories/UserLinks.stories.js
jdlrobson ad5c127239 [Storybook] Add Header component
* Moves screen variables relating to Header to Header
* Adds a Header storybook entry
* Moves data-logo from Logo template to Header.mustache
* Updates UserLinks to use USER_LINK_PARTIALS
* Renames confusing SearchBox story names
* Updates package.json to use a static folder.
* Use mediawiki.org for sourcing mw-ui-button and mw-ui-icon styles
since deploys there come earlier
* Removes usages of ID selectors

Change-Id: I0e158fa7e62c56a50cfff497d75f0808effd1eed
2021-09-14 18:33:10 +00:00

47 lines
1.2 KiB
JavaScript

import mustache from 'mustache';
import { PERSONAL_MENU_TEMPLATE_DATA, USER_LINKS_LOGGED_IN_TEMPLATE_DATA, USER_LINKS_LOGGED_OUT_TEMPLATE_DATA } from './UserLinks.stories.data';
import { userLinksTemplateLegacy, userLinksTemplate,
USER_LINK_PARTIALS } from './UserLinks.stories.data';
import '../resources/skins.vector.styles.legacy/components/UserLinks.less';
import '../resources/skins.vector.styles/components/UserLinks.less';
export default {
title: 'UserLinks'
};
export const legacyLoggedOut = () => mustache.render(
userLinksTemplateLegacy,
{
'data-personal': PERSONAL_MENU_TEMPLATE_DATA.loggedOut
},
USER_LINK_PARTIALS
);
export const legacyLoggedInWithEcho = () => mustache.render(
userLinksTemplateLegacy,
{
'data-personal': PERSONAL_MENU_TEMPLATE_DATA.loggedInWithEcho
},
USER_LINK_PARTIALS
);
export const legacyLoggedInWithULS = () => mustache.render(
userLinksTemplateLegacy,
{
'data-personal': PERSONAL_MENU_TEMPLATE_DATA.loggedInWithULS
},
USER_LINK_PARTIALS
);
export const loggedInUserLinks = () => mustache.render(
userLinksTemplate,
USER_LINKS_LOGGED_IN_TEMPLATE_DATA,
USER_LINK_PARTIALS
);
export const loggedOutUserLinks = () => mustache.render(
userLinksTemplate,
USER_LINKS_LOGGED_OUT_TEMPLATE_DATA,
USER_LINK_PARTIALS
);