mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
Docs: Add banner pointing to Hasura DDN
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10320 GitOrigin-RevId: 126de1412258380fd6396c52f6ddefd5e8df2ac1
This commit is contained in:
parent
5768af0ee7
commit
4dc57ec0b1
30
docs/src/components/BannerDismissable/DDNBanner.css
Normal file
30
docs/src/components/BannerDismissable/DDNBanner.css
Normal file
@ -0,0 +1,30 @@
|
||||
.banner {
|
||||
background-color: #1699e2;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
background: none;
|
||||
color: white;
|
||||
border: none;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close-btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.banner a {
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
21
docs/src/components/BannerDismissable/DDNBanner.tsx
Normal file
21
docs/src/components/BannerDismissable/DDNBanner.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import React, { useState } from 'react';
|
||||
import './DDNBanner.css';
|
||||
|
||||
export const DDNBanner = () => {
|
||||
const [isVisible, setIsVisible] = useState(true);
|
||||
|
||||
if (!isVisible) return null;
|
||||
|
||||
return (
|
||||
<div className="banner">
|
||||
<div>
|
||||
Hasura DDN is the future of data delivery. <a href="https://hasura.io/docs/3.0/index">Click here for the Hasura DDN docs</a>.
|
||||
</div>
|
||||
<button className="close-btn" onClick={() => setIsVisible(false)}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M6 18L18 6M6 6l12 12" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
11
docs/src/theme/Navbar/index.js
Normal file
11
docs/src/theme/Navbar/index.js
Normal file
@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import Navbar from '@theme-original/Navbar';
|
||||
import {DDNBanner} from "@site/src/components/BannerDismissable/DDNBanner";
|
||||
export default function NavbarWrapper(props) {
|
||||
return (
|
||||
<>
|
||||
<DDNBanner/>
|
||||
<Navbar {...props} />
|
||||
</>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user