mirror of
https://github.com/bspeice/speice.io
synced 2024-12-23 00:58:09 -05:00
16 lines
358 B
TypeScript
16 lines
358 B
TypeScript
import Canvas, {PainterContext} from "../src/Canvas";
|
|
import {useContext} from "react";
|
|
|
|
export function Render({f}) {
|
|
const {setPainter} = useContext(PainterContext);
|
|
setPainter(f);
|
|
return <></>;
|
|
}
|
|
|
|
export default function Gasket({f}) {
|
|
return (
|
|
<Canvas width={500} height={500}>
|
|
<Render f={f}/>
|
|
</Canvas>
|
|
)
|
|
} |