cleanplate 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/page-header/PageHeader.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.js +4 -4
- package/docs/PageHeader.md +10 -7
- package/package.json +1 -1
package/docs/PageHeader.md
CHANGED
|
@@ -90,12 +90,14 @@ import { PageHeader, Button } from "cleanplate";
|
|
|
90
90
|
### Custom title (ReactNode)
|
|
91
91
|
|
|
92
92
|
```jsx
|
|
93
|
+
import { PageHeader, Button, Container, Icon } from "cleanplate";
|
|
94
|
+
|
|
93
95
|
<PageHeader
|
|
94
96
|
title={
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
Custom title
|
|
98
|
-
</
|
|
97
|
+
<Container display="flex" align="center" gap="2" padding="0" margin="m-0">
|
|
98
|
+
<Icon name="assignment" size="medium" />
|
|
99
|
+
Custom title with icon
|
|
100
|
+
</Container>
|
|
99
101
|
}
|
|
100
102
|
subtitle="Optional subtitle"
|
|
101
103
|
primaryCta={<Button>Action</Button>}
|
|
@@ -121,14 +123,15 @@ import { PageHeader, Button } from "cleanplate";
|
|
|
121
123
|
## Behavior Notes
|
|
122
124
|
|
|
123
125
|
- **Layout:** Root is a `<header>`. Flex row: left (title + subtitle), right (CTA + more trigger). Right column uses margin-left: auto for right alignment.
|
|
124
|
-
- **Title / subtitle:**
|
|
125
|
-
- **More menu:** When moreMenuItems is set, renders a Dropdown with an icon Button (more_vert) and
|
|
126
|
-
- **Accessibility:** More trigger has aria-expanded and aria-
|
|
126
|
+
- **Title / subtitle:** Always rendered with Typography (`h4` / `p`); strings and custom ReactNode children share the same heading styles and semantics.
|
|
127
|
+
- **More menu:** When moreMenuItems is set, renders a Dropdown with an icon Button (more_vert) and MenuList; each item onClick runs and the dropdown closes. When moreMenuContent is set, that content is shown in the dropdown. Use one or the other.
|
|
128
|
+
- **Accessibility:** More trigger has aria-expanded, aria-haspopup, and aria-label; menu items use MenuList semantics.
|
|
127
129
|
|
|
128
130
|
## Related Components / Links
|
|
129
131
|
|
|
130
132
|
- Button (typically for primaryCta)
|
|
131
133
|
- Typography (used internally for string title and subtitle)
|
|
132
134
|
- Dropdown (used internally for the more menu)
|
|
135
|
+
- MenuList (used internally for moreMenuItems)
|
|
133
136
|
- Icon (more_vert trigger)
|
|
134
137
|
- Container (wrap PageHeader and page content)
|