mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-17 22:15:44 +01:00
13 lines
No EOL
263 B
JavaScript
13 lines
No EOL
263 B
JavaScript
import React from 'react';
|
|
import {useStream} from "ui/effects";
|
|
|
|
export default function SketcherMode({children, whenOff}) {
|
|
|
|
const visible = useStream(ctx => ctx.streams.sketcher.sketchingMode);
|
|
|
|
if (!visible) {
|
|
return whenOff;
|
|
}
|
|
|
|
return children;
|
|
} |