i'm a svelte beginner.
I try to build a simple modal with Sveltestrap, but my modal is not rendered correctly. It always showing following text within modal instead of header:
(node, ...args) => { var previous_component_function = dev_current_component_function; set_dev_current_component_function(component2); try { return fn(node, ...args); } finally { set_dev_current_component_function(previous_component_function); } }
My Code looks like that:
<script lang="ts">
import { Modal, ModalFooter, Button } from "@sveltestrap/sveltestrap";
let {open = $bindable()}:{
open: boolean
} = $props();
const toggle = () => (open = !open);
</script>
<Modal body header="Demo Modal" isOpen={open} {toggle}>
<ModalFooter>
<Button color="primary" on:click={toggle}>Hinzufügen</Button>
<Button color="secondary" on:click={toggle}>Abbrechen</Button>
</ModalFooter>
</Modal>
Any help would be appreciate.
regards
i'm a svelte beginner.
I try to build a simple modal with Sveltestrap, but my modal is not rendered correctly. It always showing following text within modal instead of header:
(node, ...args) => { var previous_component_function = dev_current_component_function; set_dev_current_component_function(component2); try { return fn(node, ...args); } finally { set_dev_current_component_function(previous_component_function); } }
My Code looks like that:
<script lang="ts">
import { Modal, ModalFooter, Button } from "@sveltestrap/sveltestrap";
let {open = $bindable()}:{
open: boolean
} = $props();
const toggle = () => (open = !open);
</script>
<Modal body header="Demo Modal" isOpen={open} {toggle}>
<ModalFooter>
<Button color="primary" on:click={toggle}>Hinzufügen</Button>
<Button color="secondary" on:click={toggle}>Abbrechen</Button>
</ModalFooter>
</Modal>
Any help would be appreciate.
regards
Share Improve this question asked 2 days ago marky8264marky8264 331 silver badge6 bronze badges 1- I do not see that. Please provide a complete, minimal reproduction. – brunnerh Commented 2 days ago
1 Answer
Reset to default 0i found the cause of my problem.
npm installed an old version of sveltestrap.
So i uninstalled and reinstalled the package. Now it works without any problem.