|
@@ -1,5 +1,5 @@
|
|
|
<script>
|
|
<script>
|
|
|
- let { name = $bindable(""), description = $bindable(""), onSubmit } = $props();
|
|
|
|
|
|
|
+ let { name = $bindable(""), description = $bindable(""), onSubmit, onBack } = $props();
|
|
|
|
|
|
|
|
const autofocus = (node) => { node.focus(); };
|
|
const autofocus = (node) => { node.focus(); };
|
|
|
</script>
|
|
</script>
|
|
@@ -23,7 +23,15 @@
|
|
|
></textarea>
|
|
></textarea>
|
|
|
</label>
|
|
</label>
|
|
|
|
|
|
|
|
- <button type="submit">Begin Adventure</button>
|
|
|
|
|
|
|
+ <div class="form-actions">
|
|
|
|
|
+ <button type="button" onclick={onBack}>
|
|
|
|
|
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
|
|
|
+ <path d="M19 12H5M12 5l-7 7 7 7"/>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ Back
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button type="submit">Begin Adventure</button>
|
|
|
|
|
+ </div>
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -58,8 +66,29 @@
|
|
|
font-size: 1rem;
|
|
font-size: 1rem;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .form-actions {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ gap: 0.75rem;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .form-actions button {
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .form-actions button:first-child {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 6px;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .form-actions button[type="submit"] {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@media (max-width: 700px) {
|
|
@media (max-width: 700px) {
|
|
|
.standardForm { padding: 1.75rem; }
|
|
.standardForm { padding: 1.75rem; }
|
|
|
textarea { min-height: 160px; }
|
|
textarea { min-height: 160px; }
|
|
|
|
|
+ .form-actions { flex-direction: column-reverse; }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|