Skip to content

Commit

Permalink
Change to svg for x and check. iOS could not colour the check emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
SavageCore committed Sep 24, 2023
1 parent 6de0694 commit 2ee84b0
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
28 changes: 26 additions & 2 deletions src/__snapshots__/App.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ exports[`should render without crashing 1`] = `
title="Help"
>
<svg
height="2rem"
viewBox="0 0 24 24"
width="2rem"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand All @@ -76,7 +78,9 @@ exports[`should render without crashing 1`] = `
title="View source"
>
<svg
height="2rem"
viewBox="0 0 24 24"
width="2rem"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down Expand Up @@ -327,7 +331,16 @@ exports[`should render without crashing 1`] = `
<button
class="btn red svelte-28bcpt"
>
<svg
height="2rem"
viewBox="0 0 24 24"
width="2rem"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"
/>
</svg>
</button>
<button
Expand All @@ -339,7 +352,16 @@ exports[`should render without crashing 1`] = `
<button
class="btn green svelte-28bcpt"
>
<svg
height="2rem"
viewBox="0 0 24 24"
width="2rem"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m10 15.586-3.293-3.293-1.414 1.414L10 18.414l9.707-9.707-1.414-1.414z"
/>
</svg>
</button>
</div>
</div>
Expand Down Expand Up @@ -394,7 +416,9 @@ exports[`should render without crashing 1`] = `
>
<svg
fill="#f14e32"
height="2rem"
viewBox="0 0 24 24"
width="2rem"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down
14 changes: 14 additions & 0 deletions src/assets/icons/check.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- https://boxicons.com/ -->
<script>
export let size = '2rem';
</script>

<svg
xmlns="http://www.w3.org/2000/svg"
width="{size}"
height="{size}"
viewBox="0 0 24 24"
><path
d="m10 15.586-3.293-3.293-1.414 1.414L10 18.414l9.707-9.707-1.414-1.414z"
></path></svg
>
14 changes: 14 additions & 0 deletions src/assets/icons/cross.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- https://boxicons.com/ -->
<script>
export let size = '2rem';
</script>

<svg
xmlns="http://www.w3.org/2000/svg"
width="{size}"
height="{size}"
viewBox="0 0 24 24"
><path
d="m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"
></path></svg
>
7 changes: 5 additions & 2 deletions src/components/keypad/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import { onMount } from 'svelte';
import { writable } from 'svelte/store';
import CheckIcon from '../../assets/icons/check.svelte';
import CrossIcon from '../../assets/icons/cross.svelte';
// https://i.imgur.com/NKHNmfr.png
// https://codepen.io/noleli/pen/abbeWRL
// https://www.reddit.com/r/paydaytheheist/comments/15jvvpq/payday_3_beta_vault_code_generator_from/
Expand Down Expand Up @@ -175,11 +178,11 @@
</div>
<div class="row">
<button class="btn red" on:click="{() => onKeypadInput('Backspace')}">
<CrossIcon />
</button>
<button class="btn" on:click="{() => onKeypadInput('0')}"> 0 </button>
<button class="btn green" on:click="{() => onKeypadInput('OK')}">
<CheckIcon />
</button>
</div>
</div>
Expand Down

0 comments on commit 2ee84b0

Please sign in to comment.