diff --git a/packages/orbit-components/src/Card/Card.stories.tsx b/packages/orbit-components/src/Card/Card.stories.tsx
index 98f4887ede..2e4f9886c9 100644
--- a/packages/orbit-components/src/Card/Card.stories.tsx
+++ b/packages/orbit-components/src/Card/Card.stories.tsx
@@ -13,6 +13,15 @@ import { ELEMENT_OPTIONS } from "../Heading/consts";
import Card from ".";
+const CardSectionHeaderContent = () => (
+
+ Trip length: 1h55m
+ } type="warningSubtle">
+ Unavailable
+
+
+);
+
type CardPropsAndCustomArgs = React.ComponentProps & {
expanded: boolean;
sectionTitle: string;
@@ -245,15 +254,16 @@ export const CardWithControlledWithControls: Story = {
export const CardWithDefaultExpanded: Story = {
render: ({ initialExpanded }) => (
+ }>
+ Hidden content
+
- Trip length: 1h55m
- } type="warningSubtle">
- Unavailable
-
-
+ header={}
+ actions={
+
+ Open
+
}
>
Hidden content
@@ -268,14 +278,7 @@ export const CardWithDefaultExpanded: Story = {
}
onClose={action("onClose")}
- header={
-
- Trip length: 1h55m
- } type="warningSubtle">
- Unavailable
-
-
- }
+ header={}
>
By default visible content
diff --git a/packages/orbit-components/src/Card/CardSection/index.tsx b/packages/orbit-components/src/Card/CardSection/index.tsx
index 5551bc7631..e649b4880f 100644
--- a/packages/orbit-components/src/Card/CardSection/index.tsx
+++ b/packages/orbit-components/src/Card/CardSection/index.tsx
@@ -9,6 +9,13 @@ import type { Props } from "./types";
import Header from "../components/Header";
import Expandable from "./components/Expandable";
import handleKeyDown from "../../utils/handleKeyDown";
+import Stack from "../../Stack";
+
+const Actions = ({ actions }) => (
+
+ {actions}
+
+);
export default function CardSection({
title,
@@ -68,24 +75,35 @@ export default function CardSection({
onKeyDown={onClick == null ? undefined : handleKeyDown(onClick)}
>
{(title != null || header != null) && expandable && (
-
+
+ {actions && }
+
)}
{(title != null || header != null) && !expandable && (
@@ -100,6 +118,7 @@ export default function CardSection({
actions={actions}
isSection
/>
+ {actions && }
)}
diff --git a/packages/orbit-components/src/Card/components/Header.tsx b/packages/orbit-components/src/Card/components/Header.tsx
index 58e299d25f..1e25aecc24 100644
--- a/packages/orbit-components/src/Card/components/Header.tsx
+++ b/packages/orbit-components/src/Card/components/Header.tsx
@@ -68,7 +68,7 @@ const Header = ({
color="secondary"
/>
)}
- {actions && (
+ {React.isValidElement(actions) && (
{actions}