(
props: {
duration: number
} & ParentProps,
)
| 17 | } |
| 18 | |
| 19 | export function Blink( |
| 20 | props: { |
| 21 | duration: number |
| 22 | } & ParentProps, |
| 23 | ) { |
| 24 | const [shouldShow, setShouldShow] = createSignal<boolean>(true) |
| 25 | |
| 26 | createEffect(() => { |
| 27 | setShouldShow(true) |
| 28 | const timeout = setActTimeout(() => setShouldShow(false), props.duration) |
| 29 | onCleanup(() => clearTimeout(timeout)) |
| 30 | }) |
| 31 | |
| 32 | return ( |
| 33 | <Show when={shouldShow()} fallback={<>off</>}> |
| 34 | <>{props.children}</> |
| 35 | </Show> |
| 36 | ) |
| 37 | } |
| 38 | |
| 39 | export function mockOnlineManagerIsOnline( |
| 40 | value: boolean, |
nothing calls this directly
no test coverage detected