Skip to content

Instantly share code, notes, and snippets.

@jmayergit
jmayergit / main.js
Created September 30, 2022 07:09
Typing Storybook
// @ts-check
const path = require("path");
module.exports = {
// ...
/** @param {import('@storybook/builder-webpack5/node_modules/webpack/types').Configuration} config */
webpackFinal: async (config) => {
// config is typed accordingly
return config;
<SwitchTransition>
<CSSTransition
key={stateVariable}
classNames="fade"
timeout={...}
unmountOnExit
>
{stateVariable
? <div>....</div>
: <div>....</div>