mtt-4242
mtt-4242
Explore posts from servers
SSolidJS
Created by mtt-4242 on 10/6/2024 in #support
get return cache type
does a generic type for return cache fonction exist ? did i miss it ? right now, i do it on my own but i feel this should be import from solid
type CachedFunctionResolved<T extends (...args: any[]) => Promise<unknown>> = Accessor<Awaited<ReturnType<T>>>;

const C = (props:{ data: CachedFunctionResolved<typeof getData> }) => ...
type CachedFunctionResolved<T extends (...args: any[]) => Promise<unknown>> = Accessor<Awaited<ReturnType<T>>>;

const C = (props:{ data: CachedFunctionResolved<typeof getData> }) => ...
1 replies
KPCKevin Powell - Community
Created by mtt-4242 on 2/16/2024 in #front-end
dialog toaster
Hi 👋 I'm was hoping to create a toaster that works with showModal dialog. The toaster is a popover element. It is outside the dialog and opened after the dialog element. Even if the last element of the top layer stack is visible, that doesn't seem to be the case for the ::backdrop. So the toaster is not interactive. Any idea/hack ?
<main>

<button onClick="dialog.showModal()">test</button>
<dialog id="dialog" style="margin-block:0;">

<button popovertarget="my-popover" popovertargetaction="show"> Open Popover </button>
</dialog>

<div id="my-popover" popover="manual" style="margin-block:40px;">
<p>I am a popover with more information.</p>
<button popovertarget="my-popover" popovertargetaction="hide"> Hide Popover </button>
</div>

</main>
<main>

<button onClick="dialog.showModal()">test</button>
<dialog id="dialog" style="margin-block:0;">

<button popovertarget="my-popover" popovertargetaction="show"> Open Popover </button>
</dialog>

<div id="my-popover" popover="manual" style="margin-block:40px;">
<p>I am a popover with more information.</p>
<button popovertarget="my-popover" popovertargetaction="hide"> Hide Popover </button>
</div>

</main>
2 replies