@stories-js/core
Version:
Stories web components to build stories
5 lines • 902 B
JavaScript
/*!
* (C) StoriesJS https://storiesjs.org - GPL-2.0 License
*/
import{r as s,h as t,c as o,g as i}from"./p-dea5a230.js";import{a as n}from"./p-8734f9a2.js";import{m as a}from"./p-e9f23957.js";import{A as r}from"./p-80cd706a.js";import"./p-1e8c2016.js";const e=":host{display:block;height:100%}";const c=class{constructor(t){s(this,t);this.id="ADDON_ACTIONS";this.actions=[];this.onActions=s=>{this.actions=[...this.actions,s]}}title(){return"Actions"}async storyContextChanged(s,t){console.log("AddonActions.storyContextChanged",s,t);this.actions=[]}async componentDidLoad(){n.registerAddon(this);a.on(r,this.onActions)}async disconnectedCallback(){a.off(r,this.onActions);n.unregisterAddon(this)}render(){return t(o,null,t("ul",null,this.actions.map((s=>t("li",null,s.data.name)))))}get el(){return i(this)}};c.style=e;export{c as stories_addon_actions};
//# sourceMappingURL=p-5be614ef.entry.js.map