Skip to content
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

fix: Button hover on active button #10897

Merged
merged 5 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading