@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
31 lines (30 loc) • 848 B
JavaScript
import { withActions } from "@storybook/addon-actions/decorator";
import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js";
const meta = {
title: 'Components/ThemeSwitcher',
component: 'modus-wc-theme-switcher',
args: {
'custom-class': undefined,
'initial-theme': undefined,
},
decorators: [withActions],
parameters: {
actions: {
handles: ['themeChange'],
},
},
};
export default meta;
const Template = {
// prettier-ignore
render: (args) => html `
<modus-wc-theme-provider .initialTheme=${args['initial-theme']}>
<modus-wc-theme-switcher
aria-label="Theme toggle"
custom-class=${ifDefined(args['custom-class'])}
></modus-wc-theme-switcher>
</modus-wc-theme-provider>
`,
};
export const Default = Object.assign({}, Template);