From 82c53a1c80069734da273883885d764ada0c1dd2 Mon Sep 17 00:00:00 2001 From: Garklein <63201615+Garklein@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:46:52 -0400 Subject: [PATCH] fix docs for using custom components compositionally (#2044) --- docs/advanced/creating components.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/advanced/creating components.md b/docs/advanced/creating components.md index 369405b..84e0380 100644 --- a/docs/advanced/creating components.md +++ b/docs/advanced/creating components.md @@ -226,9 +226,11 @@ Then, you can use it like any other component in `quartz.layout.ts` via `Compone As Quartz components are just functions that return React components, you can compositionally use them in other Quartz components. ```tsx title="quartz/components/AnotherComponent.tsx" -import YourComponent from "./YourComponent" +import YourComponentConstructor from "./YourComponent" export default (() => { + const YourComponent = YourComponentConstructor() + function AnotherComponent(props: QuartzComponentProps) { return (