Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/emilyhunt/advent-of-code. My attempts at the Advent of Code coding challenges! aoc.emilydoesastro.com
advent-of-code-2021 advent-of-code-2022 advent-of-code-2022-javascript advent-of-code-2023 advent-of-code-2023-javascript
Something went wrong. Try again.
610 B · 22 lines
Svelte
at main
12345678910111213141516171819202122<script> import { runOnUserData, currentUserInput } from "$lib/stores"; import Switch from "./Switch.svelte";
// This line resets user input on every page, or rather, every time a new Runner component is made runOnUserData.set(false) currentUserInput.set("Add your custom input here!")</script>
<Switch bind:checked={$runOnUserData} label="Custom data input" design="slider" fontSize={20}/>
{#if $runOnUserData} <textarea type="text" bind:value={$currentUserInput} style="margin-top: 20px"/>{/if}
<style> textarea { width: 400px; height: 100px; }</style>