mediawiki-skins-Vector/stories/skin.stories.js
Jon Robson c8d2c6e460 [Storybook] Fixes state of various components
Change-Id: Icd3fef87485aaa7abc2f10534ccdc8960ef06f1d
2022-07-08 11:36:43 -07:00

40 lines
964 B
JavaScript

import mustache from 'mustache';
import '../resources/common/common.less';
import './skin.less';
import legacySkinTemplate from '!!raw-loader!../includes/templates/skin-legacy.mustache';
import {
LEGACY_TEMPLATE_DATA,
NAVIGATION_TEMPLATE_DATA,
TEMPLATE_PARTIALS
} from './skin.stories.data';
export default {
title: 'Skin'
};
const vectorLegacyLoggedOutBody = () => mustache.render(
legacySkinTemplate,
Object.assign(
{},
LEGACY_TEMPLATE_DATA,
NAVIGATION_TEMPLATE_DATA.loggedOutWithVariants
),
TEMPLATE_PARTIALS
);
const vectorLegacyLoggedInBody = () => mustache.render(
legacySkinTemplate,
Object.assign(
{},
LEGACY_TEMPLATE_DATA,
NAVIGATION_TEMPLATE_DATA.loggedInWithMoreActions
),
TEMPLATE_PARTIALS
);
export const vectorLegacyLoggedOut = () =>
`<div class="skin-vector-legacy">${vectorLegacyLoggedOutBody()}</div>`;
export const vectorLegacyLoggedIn = () =>
`<div class="skin-vector-legacy">${vectorLegacyLoggedInBody()}</div>`;