From 4d07ac93b44f0c751009ff1dda8323ee3b4c9900 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 28 Apr 2025 21:41:04 +0000
Subject: [PATCH] chore(deps-dev): bump the production-dependencies group with 2 updates (#1952)

---
 docs/layout-components.md |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/docs/layout-components.md b/docs/layout-components.md
index 0c148a3..09c2d76 100644
--- a/docs/layout-components.md
+++ b/docs/layout-components.md
@@ -60,3 +60,34 @@
 ```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",
+})
+```
+
+The example above would only render the Search component when the page is not in fullpage mode.
+
+```typescript
+Component.ConditionalRender({
+  component: Component.Breadcrumbs(),
+  condition: (page) => page.fileData.slug !== "index",
+})
+```
+
+The example above would hide breadcrumbs on the root `index.md` page.

--
Gitblit v1.10.0