mirror of
				https://github.com/ZetaKebab/quartz.git
				synced 2025-11-03 22:49:47 +00:00 
			
		
		
		
	fix docs for using custom components compositionally (#2044)
This commit is contained in:
		@@ -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.
 | 
					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"
 | 
					```tsx title="quartz/components/AnotherComponent.tsx"
 | 
				
			||||||
import YourComponent from "./YourComponent"
 | 
					import YourComponentConstructor from "./YourComponent"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default (() => {
 | 
					export default (() => {
 | 
				
			||||||
 | 
					  const YourComponent = YourComponentConstructor()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function AnotherComponent(props: QuartzComponentProps) {
 | 
					  function AnotherComponent(props: QuartzComponentProps) {
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
      <div>
 | 
					      <div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user