Skip to content

Commit

Permalink
ticket default icon
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Apr 22, 2023
1 parent bc56d9f commit 69300ab
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions src/components/Icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
this={tabler[`Icon${name}`]}
{color}
strokeWidth={stroke} />
{:else if name === 'none'}
<svg />
{/if}
</span>
{/if}
Expand All @@ -52,4 +54,13 @@
width: 100%;
height: auto;
}
.icon.is-block {
display: block;
width: 100%;
height: 100%;
svg {
width: 100%;
height: 100%;
}
}
</style>
10 changes: 5 additions & 5 deletions src/components/NFT.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import QR from '$components/QR.svelte'
import ClipboardCopy from '$components/tools/ClipboardCopy.svelte'
import Icon from '$components/Icon.svelte'
//import { default as qrcode } from '$icons/qrcode.svelte'
import * as icons from '$icons/index.js'
export let address
export let tokenId
Expand Down Expand Up @@ -282,13 +280,14 @@
)}px; line-height: {Math.floor((4 / 32) * $ticketWidth)}px">
<span>{nft.redeemed ? 'Stub' : 'Ticket'} #{tokenId}<span /></span>
</div>
<div class="qr" class:is-proven={!!proofType}>
<svelte:component this={icons.qrcode} />
</div>
{#if channel.icon}
<div class="qr">
<img alt={channel.label} data-ipfs={channel.icon} use:ipfs />
</div>
{:else}
<div class="qr" class:is-proven={!!proofType}>
<Icon name="Ticket" class="is-block" />
</div>
{/if}
<div
class="type has-text-centered"
Expand Down Expand Up @@ -407,6 +406,7 @@
background-color: transparent;
padding: 0.3rem;
line-height: 0;
color: #ccc;
}
.type {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/project/[address]/state/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
</span>
{:else}
<span class="icon-text has-text-danger">
<Icon name="lock" />
<Icon name="Lock" />
<p class="subtitle heading pl-2">disabled</p>
</span>
{/if}
Expand Down

0 comments on commit 69300ab

Please sign in to comment.