Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(Layout): wrap LayoutShowcase in XDSSection with padding 4 (#2087)

Cindy Zhang30c3ec16e6db
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutShowcase.tsx b/packages/cli/templates/blocks/components/Layout/LayoutShowcase.tsx
index ff6dbd50de..5b62d0a87d 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutShowcase.tsx
+++ b/packages/cli/templates/blocks/components/Layout/LayoutShowcase.tsx
@@ -9,6 +9,7 @@ import {
XDSHStack,
XDSVStack,
} from '@xds/core/Layout';
+import {XDSSection} from '@xds/core/Section';
import {XDSText, XDSHeading} from '@xds/core/Text';
import {XDSButton} from '@xds/core/Button';
import {XDSBadge} from '@xds/core/Badge';
@@ -16,44 +17,46 @@ import {XDSList, XDSListItem} from '@xds/core/List';
export default function LayoutShowcase() {
return (
- <XDSLayout
- height="fill"
- header={
- <XDSLayoutHeader hasDivider>
- <XDSHStack gap={2} vAlign="center">
- <XDSHeading level={4}>Projects</XDSHeading>
- <XDSBadge variant="info" label="3 active" />
- </XDSHStack>
- </XDSLayoutHeader>
- }
- start={
- <XDSLayoutPanel hasDivider width={140}>
- <XDSList>
- <XDSListItem label="Dashboard" isSelected />
- <XDSListItem label="Analytics" />
- <XDSListItem label="Settings" />
- </XDSList>
- </XDSLayoutPanel>
- }
- content={
- <XDSLayoutContent>
- <XDSVStack gap={2}>
- <XDSHeading level={5}>Welcome back</XDSHeading>
- <XDSText type="body" color="secondary">
- You have 3 active projects and 2 pending reviews.
- </XDSText>
- </XDSVStack>
- </XDSLayoutContent>
- }
- footer={
- <XDSLayoutFooter hasDivider>
- <XDSHStack gap={2} hAlign="end">
- <XDSButton label="New Project" variant="primary">
- New Project
- </XDSButton>
- </XDSHStack>
- </XDSLayoutFooter>
- }
- />
+ <XDSSection padding={4}>
+ <XDSLayout
+ height="fill"
+ header={
+ <XDSLayoutHeader hasDivider>
+ <XDSHStack gap={2} vAlign="center">
+ <XDSHeading level={4}>Projects</XDSHeading>
+ <XDSBadge variant="info" label="3 active" />
+ </XDSHStack>
+ </XDSLayoutHeader>
+ }
+ start={
+ <XDSLayoutPanel hasDivider width={140}>
+ <XDSList>
+ <XDSListItem label="Dashboard" isSelected />
+ <XDSListItem label="Analytics" />
+ <XDSListItem label="Settings" />
+ </XDSList>
+ </XDSLayoutPanel>
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSVStack gap={2}>
+ <XDSHeading level={5}>Welcome back</XDSHeading>
+ <XDSText type="body" color="secondary">
+ You have 3 active projects and 2 pending reviews.
+ </XDSText>
+ </XDSVStack>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="New Project" variant="primary">
+ New Project
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSSection>
);
}