Skip to content

Commit

Permalink
docs: make ExampleItem title optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jtiala committed Apr 17, 2024
1 parent 1fd2b7d commit 49bc61d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/docs/utils/ExampleItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function ExampleItem({
centered,
children,
}: {
title: string;
title?: string;
direction?: "vertical" | "horizontal" | "vertical-reverse";
centered?: boolean;
children: ReactNode;
Expand All @@ -26,10 +26,9 @@ export function ExampleItem({
gap: "8px",
}}
>
<ExampleTitle>{`${title}${
direction === "horizontal" ? ":" : ""
}`}</ExampleTitle>

{title && (
<ExampleTitle>{`${title}${direction === "horizontal" ? ":" : ""}`}</ExampleTitle>
)}
{children}
</div>
);
Expand Down

0 comments on commit 49bc61d

Please sign in to comment.