From a3d9892841a0f5e1254261eadb2804c8e9baaabb Mon Sep 17 00:00:00 2001 From: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com> Date: Tue, 28 Jun 2022 18:11:28 +0200 Subject: [PATCH] Relax editable TS types to allow creating editable versions of all the JSX.IntrinsicElements elements. (#237) Enable custom editable components through relaxed typescript types --- .../shared/custom-editable-components/App.tsx | 33 +++++++++++++++++++ .../custom-editable-components/index.tsx | 10 ++++++ packages/r3f/src/main/editable.tsx | 4 +-- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 packages/playground/src/shared/custom-editable-components/App.tsx create mode 100644 packages/playground/src/shared/custom-editable-components/index.tsx diff --git a/packages/playground/src/shared/custom-editable-components/App.tsx b/packages/playground/src/shared/custom-editable-components/App.tsx new file mode 100644 index 0000000..b00c5cf --- /dev/null +++ b/packages/playground/src/shared/custom-editable-components/App.tsx @@ -0,0 +1,33 @@ +import {editable as e, SheetProvider} from '@theatre/r3f' +import {getProject} from '@theatre/core' +import React from 'react' +import {Canvas} from '@react-three/fiber' + +const EditablePoints = e('points', 'mesh') + +function App() { + return ( +