diff --git a/docs/lib/sage_rails/app/sage_components/sage_empty_state.rb b/docs/lib/sage_rails/app/sage_components/sage_empty_state.rb index 6c29f7d92d..9b8b2af6dd 100644 --- a/docs/lib/sage_rails/app/sage_components/sage_empty_state.rb +++ b/docs/lib/sage_rails/app/sage_components/sage_empty_state.rb @@ -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], diff --git a/packages/sage-react/lib/EmptyState/EmptyState.jsx b/packages/sage-react/lib/EmptyState/EmptyState.jsx index eb56246d4b..9e2ac7347a 100644 --- a/packages/sage-react/lib/EmptyState/EmptyState.jsx +++ b/packages/sage-react/lib/EmptyState/EmptyState.jsx @@ -13,6 +13,7 @@ export const EmptyState = ({ graphic, icon, backgroundColor, + scope, size, text, title, @@ -92,6 +93,7 @@ export const EmptyState = ({ }; EmptyState.SIZES = EMPTY_STATE_SIZES; +EmptyState.SCOPES = EMPTY_STATE_SIZES; EmptyState.defaultProps = { actions: null, @@ -100,6 +102,7 @@ EmptyState.defaultProps = { graphic: null, icon: null, backgroundColor: null, + scope: EmptyState.SIZES.DEFAULT, size: EmptyState.SIZES.DEFAULT, text: null, title: null, @@ -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. */