cetirizine

An experimental matrix client written in reactjs utilizing tailwind and storybook
git clone git://archive.git.mtrnord.blog/MTRNord/cetirizine.git
Log | Files | Refs | README | LICENSE

preview.tsx (1131B)


      1 import type { Preview } from "@storybook/react";
      2 import "../src/index.scss";
      3 import "./tailwindcss.scss";
      4 import { DEFAULT_THEME, withTailwindTheme } from "./withTailwindTheme.decorator";
      5 import { initAsync, start } from "@mtrnord/matrix-sdk-crypto-js";
      6 
      7 const preview: Preview = {
      8   parameters: {
      9     actions: { argTypesRegex: "^on[A-Z].*" },
     10     controls: {
     11       matchers: {
     12         color: /(background|color)$/i,
     13         date: /Date$/,
     14       },
     15     },
     16     options: {
     17       storySort: {
     18         order: ['Introduction', 'Fundamentals', '*'],
     19       },
     20     },
     21   },
     22   globalTypes: {
     23     theme: {
     24       name: "Theme",
     25       description: "Global theme for components",
     26       defaultValue: DEFAULT_THEME,
     27       toolbar: {
     28         icon: "paintbrush",
     29         // Array of plain string values or MenuItem shape (see below)
     30         items: [
     31           { value: "light", title: "Light", left: "🌞" },
     32           { value: "dark", title: "Dark", left: "🌛" },
     33         ],
     34         // Change title based on selected value
     35         dynamicTitle: true,
     36       },
     37     },
     38   },
     39   decorators: [
     40     withTailwindTheme,
     41   ],
     42 };
     43 
     44 export default preview;