use bindable instead of callback on signup version select
deploy / build-and-deploy (push) Successful in 20s
deploy / build-and-deploy (push) Successful in 20s
This commit is contained in:
1 parent
3bc7da8005
commit
ffa60e8cc5
2 files changed
+5
-6
No files matched your search
@@ -1,10 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
interface Props {
|
interface Props {
|
||||||
onSelect: (edition: 'java' | 'bedrock') => void;
|
selected: 'java' | 'bedrock' | null;
|
||||||
selected?: 'java' | 'bedrock' | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let { onSelect, selected = null }: Props = $props();
|
let { selected = $bindable() }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -15,7 +14,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="btn btn-outline h-auto py-4 flex-col gap-1"
|
class="btn btn-outline h-auto py-4 flex-col gap-1"
|
||||||
class:btn-active={selected === 'java'}
|
class:btn-active={selected === 'java'}
|
||||||
onclick={() => onSelect('java')}
|
onclick={() => (selected = 'java')}
|
||||||
>
|
>
|
||||||
<span class="text-lg">Java (PC)</span>
|
<span class="text-lg">Java (PC)</span>
|
||||||
<span class="text-xs font-normal">Anmeldung über die Webseite</span>
|
<span class="text-xs font-normal">Anmeldung über die Webseite</span>
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="btn btn-outline h-auto py-4 flex-col gap-1"
|
class="btn btn-outline h-auto py-4 flex-col gap-1"
|
||||||
class:btn-active={selected === 'bedrock'}
|
class:btn-active={selected === 'bedrock'}
|
||||||
onclick={() => onSelect('bedrock')}
|
onclick={() => (selected = 'bedrock')}
|
||||||
>
|
>
|
||||||
<span class="text-lg">Bedrock (Konsole und Handy)</span>
|
<span class="text-lg">Bedrock (Konsole und Handy)</span>
|
||||||
<span class="text-xs font-normal">Anmeldung über den Minecraft-Server</span>
|
<span class="text-xs font-normal">Anmeldung über den Minecraft-Server</span>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1 class="text-center text-3xl lg:text-5xl">Anmeldung</h1>
|
<h1 class="text-center text-3xl lg:text-5xl">Anmeldung</h1>
|
||||||
|
|
||||||
<EditionSelection onSelect={(edition) => (step = edition)} selected={step} />
|
<EditionSelection bind:selected={step} />
|
||||||
|
|
||||||
<div class:hidden={step !== 'java'}>
|
<div class:hidden={step !== 'java'}>
|
||||||
<JavaSignup
|
<JavaSignup
|
||||||
|
|||||||
Reference in new issue
Block a user