From efdb14a62a3d5562bf2b4563a75bf14787d1fb8d Mon Sep 17 00:00:00 2001
From: Rishit Gupta <74411873+Rishit30G@users.noreply.github.com>
Date: Wed, 8 Jan 2025 15:10:27 +0530
Subject: [PATCH 1/2] Storybook: Add Story for Copy Handler Component
---
.../copy-handler/stories/index.story.js | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 packages/block-editor/src/components/copy-handler/stories/index.story.js
diff --git a/packages/block-editor/src/components/copy-handler/stories/index.story.js b/packages/block-editor/src/components/copy-handler/stories/index.story.js
new file mode 100644
index 00000000000000..8bed0fd42e22e7
--- /dev/null
+++ b/packages/block-editor/src/components/copy-handler/stories/index.story.js
@@ -0,0 +1,38 @@
+/**
+ * Internal dependencies
+ */
+import CopyHandler from '..';
+
+const meta = {
+ title: 'Components/CopyHandler',
+ component: CopyHandler,
+ parameters: {
+ docs: {
+ canvas: {
+ sourceState: 'shown',
+ },
+ description: {
+ component:
+ 'The `CopyHandler` component provides a copy handler for the block editor. It is currently deprecated in favor of `BlockCanvas` or `WritingFlow`.',
+ },
+ },
+ },
+ argTypes: {
+ props: {
+ control: { type: 'object' },
+ description:
+ 'Additional properties to pass to the `CopyHandler` component.',
+ table: {
+ type: { summary: 'object' },
+ },
+ },
+ },
+};
+
+export default meta;
+
+export const Default = {
+ render: function Template( args ) {
+ return ;
+ },
+};
From bc0ec99d61bf75f1e2c4507dc74d45d23ae7d251 Mon Sep 17 00:00:00 2001
From: Rishit Gupta <74411873+Rishit30G@users.noreply.github.com>
Date: Wed, 8 Jan 2025 15:15:39 +0530
Subject: [PATCH 2/2] Add JS Docs
---
.../src/components/copy-handler/index.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/packages/block-editor/src/components/copy-handler/index.js b/packages/block-editor/src/components/copy-handler/index.js
index 0b0318c387fab7..d5bb04322d2acc 100644
--- a/packages/block-editor/src/components/copy-handler/index.js
+++ b/packages/block-editor/src/components/copy-handler/index.js
@@ -21,8 +21,18 @@ export const __unstableUseClipboardHandler = () => {
};
/**
- * @deprecated
- * @param {Object} props
+ * CopyHandler component displays a copy handler for the block editor.
+ *
+ * @param props Component props.
+ * @return {JSX.Element} CopyHandler component.
+ * @example
+ * ```jsx
+ * function Example(){
+ * return (
+ *
+ * );
+ * );
+ * }
*/
export default function CopyHandler( props ) {
deprecated( 'CopyHandler', {