From 54a0a79a39083a53ca33c5669cbee017a629e020 Mon Sep 17 00:00:00 2001 From: James Titus Date: Fri, 21 Nov 2025 15:53:27 +0530 Subject: [PATCH 01/94] chore: edit text canvas preview changes --- src/stories/SEditTextCanvas.tsx | 39 ++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/stories/SEditTextCanvas.tsx b/src/stories/SEditTextCanvas.tsx index 7c805a5..e6153fe 100644 --- a/src/stories/SEditTextCanvas.tsx +++ b/src/stories/SEditTextCanvas.tsx @@ -1,6 +1,6 @@ -import React from "react"; +import React, { useState } from "react"; import { scope } from "../scopes/Scope"; -import EditReactCanvas from "../coreComponents/EditReactCanvas" +import EditReactCanvas from "../coreComponents/EditReactCanvas"; const defaultCode = ` export default function SampleTextComponent() { @@ -45,15 +45,42 @@ export default function SampleTextComponent() { ); } -` +`; export const SEditTextCanvas: React.FC = () => { + const [code, setCode] = useState(defaultCode); + const [inputValue, setInputValue] = useState(defaultCode); + + const applyCode = () => { + setCode(inputValue); + }; + return ( -
+
+ {/* Input box */} +
+ +