Add HelpModal
This commit is contained in:
parent
328f9cadf0
commit
c034612a35
2 changed files with 25 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
import type { SharkGame } from "../shark/SharkGame";
|
import type { SharkGame } from "../shark/SharkGame";
|
||||||
|
|
||||||
import SettingsModal from "./Modals/SettingsModal.svelte";
|
import SettingsModal from "./Modals/SettingsModal.svelte";
|
||||||
|
import HelpModal from "./Modals/HelpModal.svelte";
|
||||||
|
|
||||||
export let title: string;
|
export let title: string;
|
||||||
export let game: typeof SharkGame;
|
export let game: typeof SharkGame;
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
openModal(SettingsModal, { settings: game.Settings.settings }, { replace: true });
|
openModal(SettingsModal, { settings: game.Settings.settings }, { replace: true });
|
||||||
},
|
},
|
||||||
help() {
|
help() {
|
||||||
console.log("help");
|
openModal(HelpModal, { discordLink }, { replace: true });
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
console.log("reset");
|
console.log("reset");
|
||||||
|
|
23
src/components/Modals/HelpModal.svelte
Normal file
23
src/components/Modals/HelpModal.svelte
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import BaseModal from "./BaseModal.svelte";
|
||||||
|
|
||||||
|
export let isOpen: boolean;
|
||||||
|
export let discordLink: string;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<BaseModal {isOpen}>
|
||||||
|
<div id="help-modal">
|
||||||
|
<h3>Help</h3>
|
||||||
|
<p>
|
||||||
|
Some help text may or may not go here in the future... check out our <a href={discordLink}>discord</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</BaseModal>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#help-modal {
|
||||||
|
> h3 {
|
||||||
|
border-bottom: 0.5em double var(--color-med);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Reference in a new issue