From 9d8d238912dec82ed8310eb67d0b2587f571b6db Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 24 Mar 2025 00:57:45 +0000
Subject: [PATCH] chore(deps): bump the production-dependencies group across 1 directory with 4 updates (#1867)
---
docs/layout-components.md | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/docs/layout-components.md b/docs/layout-components.md
index 0c148a3..339ace8 100644
--- a/docs/layout-components.md
+++ b/docs/layout-components.md
@@ -60,3 +60,25 @@
```typescript
Component.DesktopOnly(Component.TableOfContents())
```
+
+## `ConditionalRender` Component
+
+The `ConditionalRender` component is a wrapper that conditionally renders its child component based on a provided condition function. This is useful for creating dynamic layouts where components should only appear under certain conditions.
+
+```typescript
+type ConditionalRenderConfig = {
+ component: QuartzComponent
+ condition: (props: QuartzComponentProps) => boolean
+}
+```
+
+### Example Usage
+
+```typescript
+Component.ConditionalRender({
+ component: Component.Search(),
+ condition: (props) => props.displayClass !== "fullpage",
+})
+```
+
+This example would only render the Search component when the page is not in fullpage mode.
--
Gitblit v1.10.0