1
0
Fork 0

feat(shared): Implement docs view in workbench. See #5060

This commit is contained in:
Joost De Cock 2023-10-02 18:03:05 +02:00
parent d0d6fd0270
commit ce6a67212c
5 changed files with 40 additions and 7 deletions

View file

@ -0,0 +1,24 @@
// __SDEFILE__ - This file is a dependency for the stand-alone environment
// Hooks
import { useTranslation } from 'next-i18next'
// Components
import { DesignInfo } from 'shared/components/designs/info.mjs'
import { Popout } from 'shared/components/popout/index.mjs'
import { PageLink } from 'shared/components/link.mjs'
export const ns = ['workbench', 'designs']
export const DocsView = ({ design, setView }) => {
// Hooks
const { t } = useTranslation(ns)
return (
<div className="m-auto mt-8 max-w-7xl px-4 mb-8">
<Popout tip compact>
<PageLink txt={t('workbench:learnHowToUseEditor')} href="/docs/site/draft" />
</Popout>
<h2>{t(`designs:${design}.t`)}</h2>
<DesignInfo design={design} workbench />
</div>
)
}