import { document } from 'global';
import { action } from '@storybook/addon-actions';
import { useEffect } from '@storybook/client-api';
export default {
title: 'Demo',
};
export const Heading = () => '
Hello World
';
export const Headings = () =>
'Hello World
Hello World
Hello World
Hello World
';
export const Button = () => {
const btn = document.createElement('button');
btn.innerHTML = 'Hello Button';
btn.addEventListener('click', action('Click'));
return btn;
};
export const Effect = () => {
useEffect(() => {
document.getElementById('button').style.backgroundColor = 'yellow';
});
return '';
};