Skip to content

Commit

Permalink
chore: adds scope prop to address spec failures
Browse files Browse the repository at this point in the history
  • Loading branch information
anechol authored and kajabi-bot committed Sep 3, 2024
1 parent 67b5e9b commit fe5c375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class SageEmptyState < SageComponent
graphic: [:optional, NilClass, String],
icon: [:optional, NilClass, String],
icon_background: [:optional, NilClass, String],
scope: [:optional, NilClass, Set.new(["page", "compact", nil])]
size: [:optional, NilClass, Set.new(["compact", nil])],
text: [:optional, NilClass, String],
title: [:optional, NilClass, String],
Expand Down
7 changes: 7 additions & 0 deletions packages/sage-react/lib/EmptyState/EmptyState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const EmptyState = ({
graphic,
icon,
backgroundColor,
scope,
size,
text,
title,
Expand Down Expand Up @@ -92,6 +93,7 @@ export const EmptyState = ({
};

EmptyState.SIZES = EMPTY_STATE_SIZES;
EmptyState.SCOPES = EMPTY_STATE_SIZES;

EmptyState.defaultProps = {
actions: null,
Expand All @@ -100,6 +102,7 @@ EmptyState.defaultProps = {
graphic: null,
icon: null,
backgroundColor: null,
scope: EmptyState.SIZES.DEFAULT,
size: EmptyState.SIZES.DEFAULT,
text: null,
title: null,
Expand Down Expand Up @@ -132,6 +135,10 @@ EmptyState.propTypes = {
* Sets the background color of the icon container. Defaults to Mercury 30
*/
backgroundColor: PropTypes.string,
/**
* Sets the scope for the Empty State. Deprecated.
*/
scope: PropTypes.oneOf(Object.values(EmptyState.SIZES)),
/**
* The size and context of the Empty State.
*/
Expand Down

0 comments on commit fe5c375

Please sign in to comment.