You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2413432
Browse filesBrowse the repository at this point in the historyBrowse files
Add an optional `emptyContent` prop to `ActionPanel` for localized strings or custom React nodes.
6
+
Align the title, action icons, and empty content while preserving horizontal padding around action hover backgrounds and focus rings.
7
+
Omitting `emptyContent` shows the default message in the AppShell locale (English or Japanese); custom strings use the same muted body styling. Passing `null` hides the content and its additional spacing while keeping the card and title.
@@ -58,7 +40,15 @@ import { ActionPanel } from "@tailor-platform/app-shell";
58
40
- Rows are rendered as `<button type="button">` elements.
59
41
-`disabled` or `loading` makes the row non-interactive.
60
42
- When `loading` is `true`, the icon slot renders a spinner without shifting layout.
61
-
- Empty actions show a built-in fallback message: `No actions available`.
43
+
- Empty actions show `emptyContent`, which defaults to a styled message localized using the AppShell locale: `No actions available` in English or `利用可能なアクションはありません` in Japanese.
44
+
45
+
## Custom Empty Content
46
+
47
+
Pass a string or any `ReactNode` to `emptyContent` to replace the default content when `actions` is empty. Strings use the same muted `Text` body styling as the default message. Other React nodes render directly inside `Card.Content` without a paragraph wrapper and control their own typography. `Card.Content` owns the spacing, and the title, empty content, and action icons share the same 32px horizontal inset. Action rows retain horizontal padding around their hover backgrounds and focus rings. Custom empty content is ignored when actions are present.
48
+
49
+
<!-- example: custom-empty-content -->
50
+
51
+
Pass `null` to hide the empty content and its additional vertical spacing while keeping the card and its title. To hide the entire panel when no actions are available, render it conditionally with `actions.length > 0`.
0 commit comments