2024-08-06 12:45:25 +02:00
|
|
|
<script lang="ts">
|
|
|
|
export let price: number;
|
|
|
|
export let desc: string;
|
2024-08-06 20:26:53 +02:00
|
|
|
|
2024-08-30 17:40:02 +02:00
|
|
|
const USD = new Intl.NumberFormat('en-US', {
|
|
|
|
style: 'currency',
|
|
|
|
currency: 'USD',
|
|
|
|
minimumFractionDigits: 0
|
|
|
|
});
|
2024-08-06 12:45:25 +02:00
|
|
|
</script>
|
|
|
|
|
2024-09-09 14:57:58 +02:00
|
|
|
<button class="donation-option">
|
2024-08-09 09:13:48 +02:00
|
|
|
<div class="donate-card-title">
|
2024-08-06 12:45:25 +02:00
|
|
|
<slot></slot>
|
2024-08-30 17:40:02 +02:00
|
|
|
{ USD.format(price) }
|
2024-08-06 12:45:25 +02:00
|
|
|
</div>
|
2024-08-09 09:13:48 +02:00
|
|
|
<div class="donate-card-subtitle">{desc}</div>
|
2024-08-06 12:45:25 +02:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<style>
|
2024-08-09 09:13:48 +02:00
|
|
|
.donation-option .donate-card-subtitle {
|
2024-08-06 12:45:25 +02:00
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.donation-option :global(svg) {
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
2024-08-09 10:35:55 +02:00
|
|
|
stroke-width: 1.8px;
|
2024-08-06 12:45:25 +02:00
|
|
|
}
|
2024-08-09 09:13:48 +02:00
|
|
|
|
|
|
|
@media screen and (max-width: 550px) {
|
|
|
|
.donation-option :global(svg) {
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
}
|
|
|
|
}
|
2024-08-06 12:45:25 +02:00
|
|
|
</style>
|