UNPKG

tsm-ui

Version:

### Welcome to TSM-UI: Your Design System for Modern Web Development

2 lines (1 loc) 1.2 kB
import{r as a,e as p}from"./index.d591fb27.js";import{u as m,r as u}from"./react-18.6f784551.js";import{j as h}from"./jsx-runtime.e41c3930.js";import"./_commonjsHelpers.712cc82f.js";import"./index.237cf077.js";const{global:E}=__STORYBOOK_MODULE_GLOBAL__;var{FRAMEWORK_OPTIONS:s}=E,D=(r,t)=>{let{id:o,component:e}=t;if(!e)throw new Error(`Unable to render story ${o} as the component annotation is missing from the default export`);return h(e,{...r})},x=class extends a.exports.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidMount(){let{hasError:r}=this.state,{showMain:t}=this.props;r||t()}componentDidCatch(r){let{showException:t}=this.props;t(r)}render(){let{hasError:r}=this.state,{children:t}=this.props;return r?null:t}},c=s!=null&&s.strictMode?a.exports.StrictMode:a.exports.Fragment;async function M({storyContext:r,unboundStoryFn:t,showMain:o,showException:e,forceRemount:d},n){let i=p.createElement(x,{showMain:o,showException:e},p.createElement(t,{...r})),l=c?h(c,{children:i}):i;return d&&m(n),await u(l,n),()=>m(n)}var y={renderer:"react"};export{y as parameters,D as render,M as renderToCanvas};