Skip to content

Commit

Permalink
Merge pull request #2001 from Kajabi/GROW-2793/expandable-card-accept…
Browse files Browse the repository at this point in the history
…-id-prop

feat: add new "customKey" prop to ExpandableCard
  • Loading branch information
kajalex authored Oct 16, 2024
2 parents 8a0802d + 6d9f9b7 commit 6dc6077
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/sage-react/lib/ExpandableCard/ExpandableCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const ExpandableCard = ({
expanded,
children,
className,
customKey,
headerContent,
name,
onClick,
Expand All @@ -32,7 +33,7 @@ export const ExpandableCard = ({
}
};

const id = uuid();
const id = customKey || uuid();

const containerClassnames = classnames(
'sage-expandable-card',
Expand Down Expand Up @@ -98,6 +99,7 @@ ExpandableCard.defaultProps = {
expanded: false,
children: null,
className: null,
customKey: null,
headerContent: null,
alignTrigger: 'middle',
name: null,
Expand All @@ -109,6 +111,7 @@ ExpandableCard.defaultProps = {
ExpandableCard.propTypes = {
alignArrowRight: PropTypes.bool,
bodyBordered: PropTypes.bool,
customKey: PropTypes.string,
headerContent: PropTypes.node,
expanded: PropTypes.bool,
className: PropTypes.string,
Expand Down

0 comments on commit 6dc6077

Please sign in to comment.