Add CenteredPage template and fix SideNav collapse animation
Add CenteredPage template for no-sidebar, centered-content layouts (login, error, onboarding). Fix SideNav collapse animation where items slid right — removed nav-level items-center (each item already handles its own centering) and added overflow-hidden to clip text during the width transition. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
20
DESIGN.md
20
DESIGN.md
@@ -1092,6 +1092,26 @@ import { DetailPage } from '@/components/templates/DetailPage'
|
||||
</DetailPage>
|
||||
```
|
||||
|
||||
#### CenteredPage
|
||||
|
||||
Full-page layout with no sidebar and centered content. Use for login, sign-up, error pages, onboarding, or any focused single-task flow.
|
||||
|
||||
| Prop | Type | Default | Description |
|
||||
|------|------|---------|-------------|
|
||||
| `topBar` | `ReactNode` | — | Optional TopBar |
|
||||
| `maxWidth` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Content max width |
|
||||
| `children` | `ReactNode` | — | **Required.** Centered content |
|
||||
|
||||
```tsx
|
||||
import { CenteredPage } from '@/components/templates/CenteredPage'
|
||||
|
||||
<CenteredPage topBar={<TopBar title="" logo={<NswLogo />} />} maxWidth="md">
|
||||
<Card variant="elevated">
|
||||
<CardContent>Login form here</CardContent>
|
||||
</Card>
|
||||
</CenteredPage>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Do's and Don'ts
|
||||
|
||||
Reference in New Issue
Block a user