mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Make modal ids unique with suffix
This commit is contained in:
@@ -68,7 +68,7 @@ label[for="toggle-mobile-preview"],
|
||||
|
||||
:is(button, input, textarea, select):focus,
|
||||
#toggle-mobile-preview:checked + label {
|
||||
outline: 0.125rem solid currentColor;
|
||||
outline: 0.125rem solid var(--color-accent);
|
||||
outline-offset: 0.25rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
const { children, id, text }: { children: Snippet; id: string; text: string } = $props();
|
||||
|
||||
const modalId = `${id}-modal`
|
||||
</script>
|
||||
|
||||
<a href={`#${id}`} role="button">{text}</a>
|
||||
<a href={`#${modalId}`} role="button">{text}</a>
|
||||
|
||||
<div {id} class="modal">
|
||||
<div id={modalId} class="modal">
|
||||
<div class="modal__content">
|
||||
{@render children()}
|
||||
<a href="#!" role="button">Close</a>
|
||||
|
||||
Reference in New Issue
Block a user