feat: Add type prop to CreateNewAdventure component

The code changes include adding a new prop called "type" to the CreateNewAdventure component in order to specify the type of adventure being created. This prop is passed from the parent component and used to set the "type" property of the newAdventure object. This allows for more flexibility in creating adventures with different types.
This commit is contained in:
Sean Morley
2024-05-04 15:55:58 +00:00
parent 2b7c6b0f18
commit 79cf19ccb2
4 changed files with 38 additions and 6 deletions

View File

@@ -1,9 +1,10 @@
<script lang="ts">
let newAdventure: Adventure;
export let type: string;
newAdventure = {
id: -1,
type: "mylog",
type: type,
name: "",
location: "",
date: "",