You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
711 B

export default {
title: 'Demo',
}
export const Heading = () => '<h1>Hello World</h1>'
export const Button = () => {
const btn = document.createElement('button')
btn.type = 'button'
btn.innerText = 'Button'
btn.addEventListener('click', (e) => {
console.log('clicked')
})
return btn
}
export const withText = () => '<button class="btn">Hello World</button>'
export const withEmoji = () => {
const button = document.createElement('button')
button.innerText = '😀 😎 👍 💯'
return button
}
export const Rating = () => {
const rat = document.createElement('my-rating')
rat.type = 'my-rating'
rat.id = 'myRatingComponent'
rat.value = 4
rat.maxValue = 5
return rat
}