Open JavierPozoDelevoper opened 2 years ago
Hi, I update my code with the next part and the button click is working, but only if any control it's modified
Story Update:
export const Default = Template.bind({});
Default.args = defaultArgs;
Default.play = async () => {
const modal = document.querySelector('mpf-modal');
const button = document.getElementById('open-button');
button.onclick = () => {
modal.openModal();
};
};
is this the right way to do it or is there a better way? thx
Hi,
I am working in a modal component of Stencil for create standar modal of success, warning, error ... I would like to implement a story with a button that when clicking on the button calls the open modal method.Is this possible?
I've been trying to implement a simple console log but it's not working for me. Example:
But the console log it's not showing. Full file: mpf-modal.stories.jsx.txt
Example of how it is implemented in an angular application: HTML:
TS: