diff --git a/.gitignore b/.gitignore index 699280ec..d261c091 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ out pages/api-documentation/index.mdx .vercel .env*.local -.ignore.me.* \ No newline at end of file +.ignore.me.* +lefthook.yml diff --git a/assets/close-down.svg b/assets/close-down.svg new file mode 100644 index 00000000..fcba34b2 --- /dev/null +++ b/assets/close-down.svg @@ -0,0 +1,5 @@ + + + diff --git a/assets/community.icon.svg b/assets/community.icon.svg index 1a386617..0aa8b93c 100644 --- a/assets/community.icon.svg +++ b/assets/community.icon.svg @@ -1,4 +1,8 @@ - - - + + + diff --git a/assets/construction.svg b/assets/construction.svg new file mode 100644 index 00000000..2e108b83 --- /dev/null +++ b/assets/construction.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/assets/execution.svg b/assets/execution.svg new file mode 100644 index 00000000..df7a1184 --- /dev/null +++ b/assets/execution.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/javascript.svg b/assets/javascript.svg new file mode 100644 index 00000000..1f203d35 --- /dev/null +++ b/assets/javascript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/open-in-window.svg b/assets/open-in-window.svg new file mode 100644 index 00000000..8b663935 --- /dev/null +++ b/assets/open-in-window.svg @@ -0,0 +1,6 @@ + + + + diff --git a/assets/react.svg b/assets/react.svg new file mode 100644 index 00000000..3a27f7ce --- /dev/null +++ b/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/components/ComingSoon.tsx b/components/ComingSoon.tsx new file mode 100644 index 00000000..bea61d9d --- /dev/null +++ b/components/ComingSoon.tsx @@ -0,0 +1,15 @@ +import Construction from '@assets/construction.svg' + +type Props = {} + +export const ComingSoon = ({}: Props) => { + return ( +
+

Coming Soon

+

This section is under construction.

+
+ +
+
+ ) +} diff --git a/components/Demo.tsx b/components/Demo.tsx new file mode 100644 index 00000000..87f9feaf --- /dev/null +++ b/components/Demo.tsx @@ -0,0 +1,77 @@ +import Execution from "@assets/execution.svg"; +import CloseDown from "@assets/close-down.svg"; +import OpenInWindow from "@assets/open-in-window.svg"; +import { useState } from "react"; + +type Props = { + title?: string; + message?: string; + example: string; + preload?: boolean; + file?: string +}; + +export const Demo = ({ example, message, title, file = 'src/App.tsx', preload = true }: Props) => { + const [showDemo, setShowDemo] = useState(false); + + const src = `https://stackblitz.com/github/botpress/documentation-examples/tree/master/examples/${example}?embed=1&hideNavigation=1&view=both&file=${encodeURIComponent(file)}`; + + return ( + <> + {showDemo && ( +
+ )} +
setShowDemo(true)} + > +
+
+ +
+ {(preload || showDemo) && ( +