matiniktaff / components /button.js
Sjokode's picture
When clicking the profile icon, show a popup/menu:
d1a1dc1 verified
Raw History Blame Contribute Delete
538 Bytes
class CustomButton extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
button {
background: #667eea;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
transition: all 0.3s ease;
}
button:hover {
background: #5a67d8;
}
</style>
<button>
<slot></slot>
</button>
`;
}
}
customElements.define('custom-button', CustomButton);