Create dropdown component and update language selection with API

This commit is contained in:
Korbs 2024-07-09 21:34:52 -04:00
parent c689cd13c2
commit b09a551121

View file

@ -0,0 +1,23 @@
---
const { Name, OnClick } = Astro.props
---
<div class="tr-dropdown">
<a style="cursor: pointer;" onclick={OnClick} id={Name + '-dropdown-button'}>{Name}</a>
<div style="display: none;" id={Name + '-dropdown-menu'} class="comp-dropdown">
<slot />
</div>
</div>
<style lang="scss">
.comp-dropdown {
position: absolute;
background: #0d0d0d;
border-radius: 6px;
border: 2px #464646 solid;
width: max-content;
a {
padding: 12px 48px 12px 24px;
}
}
</style>