From abdcc01386fff0c1caa5d290cffcb0c5be906900 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sun, 22 May 2022 18:42:51 +0200
Subject: fix(storybook): create a fake wrapper for Table of Contents story

---
 .../widgets/table-of-contents.stories.tsx          | 23 +++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

(limited to 'src/components/organisms/widgets/table-of-contents.stories.tsx')

diff --git a/src/components/organisms/widgets/table-of-contents.stories.tsx b/src/components/organisms/widgets/table-of-contents.stories.tsx
index d8b3af7..9490ee3 100644
--- a/src/components/organisms/widgets/table-of-contents.stories.tsx
+++ b/src/components/organisms/widgets/table-of-contents.stories.tsx
@@ -26,8 +26,29 @@ const Template: ComponentStory<typeof ToCWidget> = (args) => (
   <ToCWidget {...args} />
 );
 
+export const GetWrapper = () => {
+  const wrapper = document.createElement('div');
+  const firstTitle = document.createElement('h2');
+  const firstParagraph = document.createElement('p');
+  const secondTitle = document.createElement('h2');
+  const secondParagraph = document.createElement('p');
+
+  firstTitle.textContent = 'dignissimos odit odit';
+  firstParagraph.textContent =
+    'Sint error saepe in. Vel doloribus facere deleniti minima magni. Consequatur veniam quia rerum praesentium eaque culpa culpa quas optio.';
+  secondTitle.textContent = 'aliquam exercitationem ut';
+  secondParagraph.textContent =
+    'Doloribus sunt ut pariatur et praesentium rerum quam deserunt. Quod omnis quia qui quis debitis recusandae. Voluptate et impedit quam quidem quis id explicabo similique enim. Velit illum amet quos veniam consequatur amet nam sunt et. Et odit atque totam culpa officia saepe sed eaque consequatur.';
+
+  wrapper.append(...[firstTitle, firstParagraph, secondTitle, secondParagraph]);
+
+  return wrapper;
+};
+
 /**
  * Widgets Stories - Table of Contents
  */
 export const TableOfContents = Template.bind({});
-TableOfContents.args = {};
+TableOfContents.args = {
+  wrapper: GetWrapper(),
+};
-- 
cgit v1.2.3

