From 39d001eed7625b1c9e2bd03873c717cad0c57670 Mon Sep 17 00:00:00 2001 From: Marco Kittel Date: Tue, 10 Jun 2025 21:01:50 +0200 Subject: [PATCH] props ausprobiert --- src/App.tsx | 2 +- src/Foo.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index d15aed2..f779d0a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -54,7 +54,7 @@ function App() { - + ); } diff --git a/src/Foo.tsx b/src/Foo.tsx index e66b22c..2341210 100644 --- a/src/Foo.tsx +++ b/src/Foo.tsx @@ -1,5 +1,14 @@ -export function FooComponent(){ +import { createSignal} from "solid-js"; + +export function FooComponent(props){ +const [theme, setTheme] = createSignal("light") return ( -
Exported Foo Component
+ <> +
+ This div's theme is determined dynamically! +
+

props.text

+ + ); } \ No newline at end of file