Spaces:
Running
Running
File size: 721 Bytes
28498bf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | class ContactButton extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.contact-button {
display: inline-block;
padding: 12px 24px;
background-color: #000;
color: white;
border-radius: 50px;
font-weight: 500;
transition: all 0.3s ease;
text-decoration: none;
}
.contact-button:hover {
background-color: #333;
transform: translateY(-2px);
}
</style>
<a href="/contact" class="contact-button">
Get in touch
</a>
`;
}
}
customElements.define('contact-button', ContactButton); |