Skip to content

Commit

Permalink
Merge pull request kodadot#10897 from hassnian/issue-10896
Browse files Browse the repository at this point in the history
fix: Button hover on active button
  • Loading branch information
hassnian authored Aug 28, 2024
2 parents 3a359b2 + d48781b commit 63bf7e9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
3 changes: 2 additions & 1 deletion components/navbar/ConnectedProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</template>

<script lang="ts" setup>
import type { Prefix } from '@kodadot1/static'
import { NeoButton, NeoSkeleton } from '@kodadot1/brick'
import { useChainId } from '@wagmi/vue'
Expand All @@ -56,5 +57,5 @@ const label = computed(() => profile.value ? profile.value?.name : shortAddress(
const chainIcon = computed(() => getChainIcon(execByVm({
SUB: () => 'ahp',
EVM: () => CHAIN_ID_TO_PREFIX[chainId.value] ?? '',
}, { vm: getWalletVM.value })))
}, { vm: getWalletVM.value }) as Prefix))
</script>
18 changes: 0 additions & 18 deletions components/profile/FilterButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<NeoButton
:variant="variant"
:active="model"
no-shadow
rounded
:label="label"
@click="model = !model"
/>
Expand All @@ -29,19 +27,3 @@ const model = computed({
},
})
</script>

<style scoped lang="scss">
@import '@/assets/styles/abstracts/variables';
.active {
@include ktheme() {
border-color: theme('background-color-inverse') !important;
}
&:hover {
@include ktheme() {
background-color: theme('background-color-inverse') !important;
color: theme('text-color-inverse') !important;
}
}
}
</style>
2 changes: 0 additions & 2 deletions components/profile/ProfileDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
variant="outlined-rounded"
data-testid="profile-wallet-links-button"
:active="active"
dropdown
:icon-right="active ? 'chevron-up' : 'chevron-down'"
>
{{ $t('profile.walletAndLinks') }}
Expand Down Expand Up @@ -194,7 +193,6 @@
<NeoButton
variant="outlined-rounded"
icon="arrow-up-from-bracket"
dropdown
:active="active"
/>
</template>
Expand Down
8 changes: 4 additions & 4 deletions libs/ui/src/components/NeoButton/NeoButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

&:not(.pressing):active,
&:not(.pressing).active {
@apply bg-background-color-inverse text-text-color-inverse;
@apply bg-background-color-inverse text-text-color-inverse border-border-color;
}
}

Expand All @@ -46,7 +46,7 @@
@apply border-border-color #{!important};
}

&:not(.dropdown.active):hover {
&:not(.active):hover {
@apply bg-background-color text-text-color;
}

Expand Down Expand Up @@ -116,7 +116,7 @@
&--outlined-rounded {
@apply w-min py-2 px-4 rounded-[3rem] shadow-none border border-card-border-color-light bg-background-color;

&:not(.dropdown.active):hover {
&:not(.active):hover {
@apply bg-background-color border border-text-color text-text-color;
}

Expand All @@ -131,7 +131,7 @@
&--primary-rounded {
@apply h-[40px] w-min rounded-3xl shadow-none border border-border-color bg-k-primary text-black;

&:not(.dropdown.active):hover {
&:not(.active):hover {
@apply bg-background-color border border-text-color text-text-color;
}

Expand Down
2 changes: 0 additions & 2 deletions libs/ui/src/components/NeoButton/NeoButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
'no-shadow': noShadow,
'loading-with-label': loadingWithLabel,
'shiny': shiny,
'dropdown': dropdown,
'pressing': pressing,
}"
:size="size"
Expand Down Expand Up @@ -48,7 +47,6 @@ const props = withDefaults(
iconPack?: string
label?: string
active?: boolean
dropdown?: boolean
fixedWidth?: boolean
noShadow?: boolean
variant?: NeoButtonVariant
Expand Down

0 comments on commit 63bf7e9

Please sign in to comment.