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

listing fee tooltip #1175

Merged
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
5 changes: 5 additions & 0 deletions frontend/marketplace/src/assets/questionIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 17 additions & 6 deletions frontend/marketplace/src/components/BuyCredits.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useFetcher, authHeader } from "@/utils/fetcher";
import { useAuth } from "@/stores/auth";
import { useWallet } from "@/stores/wallet";
import { useNotifyer } from "@/utils/notifyer";
import Tooltip from "@/components/ui/Tooltip.vue";

export interface BuyCreditsProps {
availableCredits: number;
Expand Down Expand Up @@ -226,9 +227,13 @@ const handleCardPayment = async (retirererName: string) => {
<div class="flex flex-col mb-6 lg:mb-0">
<div class="flex">
<div class="flex flex-col mb-0 mt-7">
<p class="text-title18 text-subLabel text-right hidden md:block mr-3">
Cost
</p>
<div class="md:flex flex-row items-center hidden mr-3">
<p class="text-title18 text-subLabel text-right mr-2">Cost</p>
<Tooltip
label="The seller will be charged a 3% service fee + 0-5% payment processing fee"
icon-class="w-[40px] h-[40px]"
/>
</div>
<p class="text-title18 text-subLabel text-right hidden md:block mr-3">
{{ amount >= 0 ? pricePerCredit * amount : "0" }}
</p>
Expand All @@ -243,9 +248,15 @@ const handleCardPayment = async (retirererName: string) => {
/>
</div>
</div>
<p class="text-title18 text-subLabel md:hidden">
Cost {{ pricePerCredit * amount }} ${{ coinFormatted }}
</p>
<div class="flex items-center text-title18 text-subLabel mt-2 md:hidden">
Cost
{{ pricePerCredit * amount }} ${{ coinFormatted }}
<Tooltip
label="The seller will be charged a 3% service fee + 0-5% payment processing fee"
icon-class="w-[20px] h-[20px]"
class="ml-2"
/>
</div>
</div>
<div class="flex flex-col w-full lg:w-auto lg:self-end">
<BuyButton
Expand Down
19 changes: 19 additions & 0 deletions frontend/marketplace/src/components/ui/Tooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script setup lang="ts">
interface Props {
label: string;
iconClass: string;
}
const props = defineProps<Props>();
</script>
<template>
<p class="tooltip" :data-tip="props.label">
<img :class="props.iconClass" src="../../assets/questionIcon.svg" />
</p>
</template>
<style>
.tooltip {
--tooltip-color: #000000;
--tooltip-text-color: #ffffff;
--tooltip-tail: 10px;
PiranavanShanmugavadivelu marked this conversation as resolved.
Show resolved Hide resolved
}
</style>
Loading