Skip to content

Commit 82c53a1

Browse files
authored
fix docs for using custom components compositionally (#2044)
1 parent eceefd1 commit 82c53a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/advanced/creating components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,11 @@ Then, you can use it like any other component in `quartz.layout.ts` via `Compone
226226
As Quartz components are just functions that return React components, you can compositionally use them in other Quartz components.
227227

228228
```tsx title="quartz/components/AnotherComponent.tsx"
229-
import YourComponent from "./YourComponent"
229+
import YourComponentConstructor from "./YourComponent"
230230

231231
export default (() => {
232+
const YourComponent = YourComponentConstructor()
233+
232234
function AnotherComponent(props: QuartzComponentProps) {
233235
return (
234236
<div>

0 commit comments

Comments
 (0)