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

Improved copyable in ReceiveModal #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
34 changes: 5 additions & 29 deletions src/components/modals/ReceiveModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
<QrCodeIcon/>
</button>
<Identicon :address="activeAddressInfo.address"/>
<Copyable :text="activeAddressInfo.address">
<AddressDisplay :address="activeAddressInfo.address"/>
</Copyable>
<AddressDisplay :address="activeAddressInfo.address" copyable/>
<button
v-if="activeAddressInfo.type === AddressType.BASIC"
@click="receiveLinkOverlayOpened = true"
Expand Down Expand Up @@ -48,7 +46,6 @@ import {
AddressDisplay,
QrCodeIcon,
QrCode,
Copyable,
} from '@nimiq/vue-components';
import Modal, { disableNextModalTransition } from './Modal.vue';
import { useAddressStore, AddressType } from '../../stores/Address';
Expand Down Expand Up @@ -90,7 +87,6 @@ export default defineComponent({
AddressDisplay,
QrCodeIcon,
QrCode,
Copyable,
PaymentLinkOverlay,
QrCodeOverlay,
} as any,
Expand Down Expand Up @@ -127,31 +123,11 @@ export default defineComponent({
margin-top: 3rem;
}

.copyable {
padding: 0.5rem;
& ::v-deep .copyable {
background: var(--nimiq-highlight-bg);
border-radius: 0.625rem;
margin: 1rem 0 4rem;
Comment on lines -133 to -134
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This border-radius and margins should stay, to keep the same style.


transition:
color .3s var(--nimiq-ease),
background 0.3s var(--nimiq-ease);

::v-deep .background {
display: none;
}

.address-display {
transition: opacity 0.3s var(--nimiq-ease);
font-weight: 500;
opacity: 1;
}

&:hover,
&:focus,
&.copied {
background: rgba(5, 130, 202, 0.07); // Based on Nimiq Light Blue
}
Comment on lines -150 to -154
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles should be ported, to keep the same hover style.

color: var(--nimiq-blue);
padding: 1.25rem 1.5rem;
font-weight: 500;
}
}

Expand Down