UNPKG

react-link-textarea

Version:

Enhancing UX by breaking the limitations of original textarea tag, supports link integration and offers flexible styling options.

2 lines (1 loc) 1.12 kB
import{R as o,r as i}from"./index-76fb7be0.js";import{u as p,r as d}from"./react-18-236157c6.js";import"./_commonjsHelpers-de833af9.js";const{global:u}=__STORYBOOK_MODULE_GLOBAL__;var{FRAMEWORK_OPTIONS:s}=u,x=(r,e)=>{let{id:n,component:t}=e;if(!t)throw new Error(`Unable to render story ${n} as the component annotation is missing from the default export`);return o.createElement(t,{...r})},E=class extends i.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidMount(){let{hasError:r}=this.state,{showMain:e}=this.props;r||e()}componentDidCatch(r){let{showException:e}=this.props;e(r)}render(){let{hasError:r}=this.state,{children:e}=this.props;return r?null:e}},c=s!=null&&s.strictMode?i.StrictMode:i.Fragment;async function _({storyContext:r,unboundStoryFn:e,showMain:n,showException:t,forceRemount:l},a){let m=o.createElement(E,{showMain:n,showException:t},o.createElement(e,{...r})),h=c?o.createElement(c,null,m):m;return l&&p(a),await d(h,a),()=>p(a)}var C={renderer:"react"};export{C as parameters,x as render,_ as renderToCanvas};