diff --git a/packages/gestalt/src/ModuleExpandable.js b/packages/gestalt/src/ModuleExpandable.js index b3fd7c4e10..a02a96fbcf 100644 --- a/packages/gestalt/src/ModuleExpandable.js +++ b/packages/gestalt/src/ModuleExpandable.js @@ -12,7 +12,7 @@ export default function ModuleExpandable({ expandedIndex, onExpandedChange, items, -}: Props): Node { +}: ExpandableBaseProps): Node { const [expandedId, setExpandedId] = useState( Number.isFinite(expandedIndex) ? expandedIndex : null ); diff --git a/packages/gestalt/src/__snapshots__/ModuleExpandable.test.js.snap b/packages/gestalt/src/__snapshots__/ModuleExpandable.test.js.snap index 554b8601a9..cd6751361b 100644 --- a/packages/gestalt/src/__snapshots__/ModuleExpandable.test.js.snap +++ b/packages/gestalt/src/__snapshots__/ModuleExpandable.test.js.snap @@ -273,7 +273,7 @@ exports[`Module Expandable renders correctly with multiple items 1`] = ` `; -exports[`renders correctly with multiple items with expandedId 1`] = ` +exports[`Module Expandable renders correctly with one item 1`] = `
@@ -283,8 +283,8 @@ exports[`renders correctly with multiple items with expandedId 1`] = `
- Title1 + Title +
+
+
+
+
+ summary1 +
+
+
+
+ summary2 +
+
+
+
+ summary3 +
@@ -328,7 +362,7 @@ exports[`renders correctly with multiple items with expandedId 1`] = ` >
-
- Children1 -
-
+ +`; + +exports[`renders correctly with multiple items with expandedId 1`] = ` +
- Title2 -
-
-
-
-
- summary2 -
+ Title1
+
+ Children1 +

- - - -
-
- Title3 + Title2
- summary3 + summary2
- -`; - -exports[`renders correctly with one item 1`] = ` -
+
- Title -
-
-
-
-
- summary1 -
+ +
-
- summary2 -
+ Title3
+
+
@@ -619,7 +619,7 @@ exports[`renders correctly with one item 1`] = `
, @@ -25,6 +26,7 @@ export type ExpandableBaseProps = {| type?: TypeOptions, children?: Node, |}>, + onExpandedChange?: (?number) => void, |}; export type ExpandableItemProps = {|