-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Tried the example from https://github.com/solidjs-community/solid-transition-group/blob/main/dev/kitchen-sink.tsx#L68 , it simply disappears
const SwitchCSS: Component = () => {
const [page, setPage] = createSignal(1);
createEffect(() => {
console.log(page())
})
return (
<>
<button onClick={() => { setPage(p => ++p) }}>Next</button>
<br />
<Transition mode="outin" name="fade">
<Show when={page()} keyed>
{i => <div style={{ "background-color": getRandomColor(), padding: "1rem" }}>{i}.</div>}
</Show>
</Transition>
</>
);
};
.fade-enter-active,
.fade-exit-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-exit-to {
opacity: 0;
}
Metadata
Metadata
Assignees
Labels
No labels