chore(docs): Refactor API Reference (#1883)
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
import React, { useEffect, useState } from "react"
|
||||
|
||||
import CloseIcon from "../close-icon"
|
||||
import ConfLogo from "../../../static/img/logo.svg"
|
||||
import clsx from "clsx"
|
||||
import styles from "./banner.module.css"
|
||||
import {useColorMode} from '@docusaurus/theme-common';
|
||||
|
||||
const Banner = (props) => {
|
||||
const [isBannerVisible, setIsBannerVisible] = useState(true)
|
||||
const { isDarkTheme } = useColorMode()
|
||||
|
||||
const handleDismissBanner = () => {
|
||||
setIsBannerVisible(false)
|
||||
if (localStorage) {
|
||||
localStorage.setItem("mc::banner", false)
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (localStorage) {
|
||||
const shouldShow = localStorage.getItem("mc::banner")
|
||||
if (!shouldShow) {
|
||||
setIsBannerVisible(true)
|
||||
}
|
||||
|
||||
if (shouldShow === "false") {
|
||||
setIsBannerVisible(false)
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
isBannerVisible && (
|
||||
<div className={clsx(styles.bannerContainer, "margin-top--lg")}>
|
||||
<div
|
||||
className={clsx(styles.banner, "padding--sm", "padding-right--md")}
|
||||
>
|
||||
<div className="padding" sx={{ marginLeft: "10px" }}>
|
||||
<ConfLogo />
|
||||
<p className="padding-left--md">
|
||||
We are still working on building out our documentation and guides,
|
||||
but if you are interested in learning more please reach out - we
|
||||
would love to jump on a call with you and help you get set up!
|
||||
</p>
|
||||
</div>
|
||||
{/* <div style={{ cursor: "pointer" }} onClick={handleDismissBanner}>
|
||||
<CloseIcon fill={isDarkTheme ? "white" : "black"} />
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
export default Banner
|
||||
@@ -1,18 +0,0 @@
|
||||
.bannerContainer {
|
||||
height: 100%;
|
||||
padding: 10px 0px;
|
||||
margin-bottom: 20px;
|
||||
background-color: var(--ifm-medusa-gray);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.bannerContainer svg {
|
||||
max-width: 100px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.banner {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export { default as Banner } from "./Banner"
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from "react"
|
||||
import React, { useEffect } from "react"
|
||||
|
||||
import RootLayout from "@theme/Layout"
|
||||
|
||||
const Layout = ({ children, ...props }) => {
|
||||
|
||||
@@ -11,5 +11,4 @@
|
||||
color: var(--ifm-color-primary);
|
||||
border-bottom: 3px solid var(--ifm-color-primary) !important;
|
||||
font-weight: 500;
|
||||
transition: ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user