mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 09:20:21 -04:00
ec1c534013
* Add db wrappers open in dashboard cta * Restore getLatestRelease return to null * Add guide template components with flexible content positioning * Add Guide components with composition pattern * Remove default branch on tag value * Add GuideTemplate component and do some clean up * Restore original GuideTemplate * Clean up code and unused props * Remove displayName * Remove unwanted export * Refactor EditLink to its own helper file * Apply several fixes * Fix underline on cta button * Remove default main tag * More descriptive button cta label * fix(docs): add iceberg_wrapper dashboard integration --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { type ReactNode } from 'react'
|
|
|
|
import type { WithRequired } from '~/features/helpers.types'
|
|
import { EditLink } from '~/features/helpers.edit-link'
|
|
import { type GuideFrontmatter } from '~/lib/docs'
|
|
import { SerializeOptions } from '~/types/next-mdx-remote-serialize'
|
|
|
|
import { Guide, GuideArticle, GuideFooter, GuideHeader, GuideMdxContent } from './guide'
|
|
|
|
interface BaseGuideTemplateProps {
|
|
meta?: GuideFrontmatter
|
|
content?: string
|
|
children?: ReactNode
|
|
editLink: EditLink
|
|
mdxOptions?: SerializeOptions
|
|
}
|
|
|
|
type GuideTemplateProps =
|
|
| WithRequired<BaseGuideTemplateProps, 'children'>
|
|
| WithRequired<BaseGuideTemplateProps, 'content'>
|
|
|
|
const GuideTemplate = ({ meta, content, children, editLink, mdxOptions }: GuideTemplateProps) => {
|
|
return (
|
|
<Guide meta={meta}>
|
|
<GuideArticle>
|
|
<GuideHeader />
|
|
<GuideMdxContent content={content} mdxOptions={mdxOptions}></GuideMdxContent>
|
|
{children}
|
|
<GuideFooter editLink={editLink} />
|
|
</GuideArticle>
|
|
</Guide>
|
|
)
|
|
}
|
|
|
|
export { GuideTemplate }
|