-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ active state to NeoDropdown
#4621
✨ active state to NeoDropdown
#4621
Conversation
SUCCESS @petersopko PR for issue #4603 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime! |
✅ Deploy Preview for koda-nuxt ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
some context:
maybe I missed something, or I'm just wrong and there are better ways to do this, if so, please let me know and I'll adjust. |
alternatives:
// NeoDropdown.vue
<template>
<o-dropdown
aria-role="list"
:position="position"
:append-to-body="appendToBody"
class="neo-dropdown">
<template #trigger="{ active }">
<slot :active="active && 'is-active'" />
</template>
<slot name="items" />
</o-dropdown>
</template> // GalleryItemShareBtn.vue
<NeoDropdown>
<template #default="slotProps">
<NeoButton
label="Share"
icon="share-square"
:class="slotProps.active" />
</template>
<template>
<o-dropdown
aria-role="list"
:position="position"
:append-to-body="appendToBody"
class="neo-dropdown"
:class="{ 'o-drop-active': isActive }"
@active-change="isActive = $event">
<template #trigger>
<slot />
</template>
<slot name="items" />
</o-dropdown>
</template>
<script lang="ts" setup>
import { ODropdown } from '@oruga-ui/oruga'
// ...
const isActive = ref(false)
</script>
<style lang="scss">
// ...
// example, override is-neo in here
.o-drop-active {
.is-neo,
.is-neo:hover {
background-color: black;
color: white;
}
}
</style> |
cc @roiLeo, maybe have another concern |
Code Climate has analyzed commit b49440f and detected 0 issues on this pull request. View more on Code Climate. |
Well, I've learned something new today 😆 went with the second option; let's see what @roiLeo will have to say |
ShareBtn
and MoreBtn
NeoDropdownsNeoDropdown
I'm fine with this solution as long as we don't change when dropdown is used without button (check NeoDropdown story) it's still strange that we don't have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ code lgtm
yes please |
pay 30 usd |
😍 Perfect, I’ve sent the payout 🪅 Let’s grab another issue and get rewarded! |
added again here, sorry |
Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR Type
Context
Before submitting pull request, please make sure:
Optional
Had issue bounty label?
Community participation
Screenshot 📸
KodaDot.-.Kusama.NFT.Market.Explorer._.Low.Carbon.NFTs.-.Google.Chrome.2023-01-05.19-58-24.mp4