From 9448df39555174e09088a2423be29e0a993c00e2 Mon Sep 17 00:00:00 2001 From: I531348 Date: Wed, 27 Nov 2024 15:48:44 +0100 Subject: [PATCH] chore(ui): add deprecation warnings to content wrapper --- .../ContentAreaWrapper/ContentAreaWrapper.component.js | 7 +++++++ .../ContentAreaWrapper/ContentAreaWrapper.stories.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.component.js b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.component.js index 964ab50d4..a844bd084 100644 --- a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.component.js +++ b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.component.js @@ -6,6 +6,8 @@ import React from "react" import PropTypes from "prop-types" +import { withDeprecationWarning } from "../../deprecated_js/withDeprecationWarning/withDeprecationWarning.component" + const containerStyles = ` jn-relative jn-grow @@ -30,3 +32,8 @@ ContentAreaWrapper.propTypes = { className: PropTypes.string, children: PropTypes.node, } + +export default withDeprecationWarning( + ContentAreaWrapper, + "ContentAreaWrapper is deprecated and will be removed in future versions." +) diff --git a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js index 52e7ae9d6..df217ae64 100644 --- a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js +++ b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js @@ -11,7 +11,7 @@ import { ContentAreaToolbar } from "../../components/ContentAreaToolbar/ContentA import { Button } from "../Button/index.js" export default { - title: "Internal/ContentAreaWrapper", + title: "Deprecated/ContentAreaWrapper", component: ContentAreaWrapper, argTypes: { children: { @@ -35,7 +35,7 @@ export const Basic = { parameters: { docs: { description: { - story: "OBSOLETE: Will be deleted!", + story: "Deprecated: Will be deleted!", }, }, },