Skip to content

Commit

Permalink
Merge pull request #1942 from Kajabi/chore/empty-state-scope
Browse files Browse the repository at this point in the history
Empty State - Scope Prop
  • Loading branch information
anechol authored Aug 8, 2024
2 parents ee69286 + f14fad7 commit 11ead6d
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 11ead6d

Please sign in to comment.