There was an error while loading. Please reload this page.
2 parents 0a40bd8 + b9b1d0a commit 7d4b5eeCopy full SHA for 7d4b5ee
1 file changed
src/theme/DocItem/Layout/index.js
@@ -0,0 +1,23 @@
1
+import React from 'react';
2
+import Layout from '@theme-original/DocItem/Layout';
3
+import { useDoc } from '@docusaurus/plugin-content-docs/client';
4
+
5
+export default function LayoutWrapper(props) {
6
+ const { frontMatter } = useDoc();
7
8
+ return (
9
+ <>
10
+ {frontMatter?.isDraft && (
11
+ <div className="margin-bottom--md">
12
+ <span
13
+ className="badge badge--warning"
14
+ style={{ fontSize: '0.85rem', padding: '0.4rem 0.8rem' }}
15
+ >
16
+ 🚧 Work in Progress / Draft
17
+ </span>
18
+ </div>
19
+ )}
20
+ <Layout {...props} />
21
+ </>
22
+ );
23
+}
0 commit comments