From fa8780378cc5d2ea1e0098f14bd14d0c69a734fa Mon Sep 17 00:00:00 2001 From: vidit kushwaha Date: Sat, 12 Oct 2024 14:50:50 +0530 Subject: [PATCH 1/3] added popper docs Signed-off-by: vidit kushwaha --- src/components/SistentNavigation/content.js | 15 ++ .../sistent/components/popper/code.js | 8 + .../sistent/components/popper/guidance.js | 8 + .../sistent/components/popper/index.js | 8 + .../Projects/Sistent/components/index.js | 7 + .../Sistent/components/popper/code.js | 186 ++++++++++++++++++ .../Sistent/components/popper/guidance.js | 174 ++++++++++++++++ .../Sistent/components/popper/index.js | 126 ++++++++++++ 8 files changed, 532 insertions(+) create mode 100644 src/pages/projects/sistent/components/popper/code.js create mode 100644 src/pages/projects/sistent/components/popper/guidance.js create mode 100644 src/pages/projects/sistent/components/popper/index.js create mode 100644 src/sections/Projects/Sistent/components/popper/code.js create mode 100644 src/sections/Projects/Sistent/components/popper/guidance.js create mode 100644 src/sections/Projects/Sistent/components/popper/index.js diff --git a/src/components/SistentNavigation/content.js b/src/components/SistentNavigation/content.js index 51f8f57618ae..44794fb8db4f 100644 --- a/src/components/SistentNavigation/content.js +++ b/src/components/SistentNavigation/content.js @@ -43,4 +43,19 @@ export const content = [ link: "/projects/sistent/components/text-input/code", text: "Text Input", }, + { + id: 15, + link: "/projects/sistent/components/popper", + text: "Popper", + }, + { + id: 16, + link: "/projects/sistent/components/popper/guidance", + text: "Popper", + }, + { + id: 17, + link: "/projects/sistent/components/popper/code", + text: "Popper", + }, ]; diff --git a/src/pages/projects/sistent/components/popper/code.js b/src/pages/projects/sistent/components/popper/code.js new file mode 100644 index 000000000000..9327a30755d0 --- /dev/null +++ b/src/pages/projects/sistent/components/popper/code.js @@ -0,0 +1,8 @@ +import React from "react"; +import { PooperCode } from "../../../../../sections/Projects/Sistent/components/popper/code"; + +const PopperCodePage = () => { + return ; +}; + +export default PopperCodePage; diff --git a/src/pages/projects/sistent/components/popper/guidance.js b/src/pages/projects/sistent/components/popper/guidance.js new file mode 100644 index 000000000000..70cde98837c0 --- /dev/null +++ b/src/pages/projects/sistent/components/popper/guidance.js @@ -0,0 +1,8 @@ +import React from "react"; +import { PopperGuidance } from "../../../../../sections/Projects/Sistent/components/popper/guidance"; + +const PopperGuidancePage = () => { + return ; +}; + +export default PopperGuidancePage; diff --git a/src/pages/projects/sistent/components/popper/index.js b/src/pages/projects/sistent/components/popper/index.js new file mode 100644 index 000000000000..e75d22655e5f --- /dev/null +++ b/src/pages/projects/sistent/components/popper/index.js @@ -0,0 +1,8 @@ +import React from "react"; +import { SistentPopper } from "../../../../../sections/Projects/Sistent/components/popper"; + +const SistentPopperPage = () => { + return ; +}; + +export default SistentPopperPage; diff --git a/src/sections/Projects/Sistent/components/index.js b/src/sections/Projects/Sistent/components/index.js index 8bb294655b0f..a25c3986892d 100644 --- a/src/sections/Projects/Sistent/components/index.js +++ b/src/sections/Projects/Sistent/components/index.js @@ -30,6 +30,13 @@ const componentsData = [ "A text input is made up of multiple elements that combine to form a component that helps users to read, write, and edit text in an interface.", url: "/projects/sistent/components/modal", }, + { + id: 4, + name: "Popper", + description: + "A popper is a tooltip that appears when a user interacts with an element.", + url: "/projects/sistent/components/popper", + }, ]; const SistentComponents = () => { diff --git a/src/sections/Projects/Sistent/components/popper/code.js b/src/sections/Projects/Sistent/components/popper/code.js new file mode 100644 index 000000000000..fd9425703495 --- /dev/null +++ b/src/sections/Projects/Sistent/components/popper/code.js @@ -0,0 +1,186 @@ +import React, { useRef, useState } from "react"; +import { navigate } from "gatsby"; +import { SistentThemeProvider, Popper, Button } from "@layer5/sistent"; +import { SistentLayout } from "../../sistent-layout"; +import { CodeBlock } from "../button/code-block"; +import TabButton from "../../../../../reusecore/Button"; +import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; + +const codes = [ + `