B2B-88: add starter kit structure and elements
This commit is contained in:
36
packages/cms/keystatic/src/custom-components.tsx
Normal file
36
packages/cms/keystatic/src/custom-components.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { ComponentType } from 'react';
|
||||
|
||||
import type { Schema } from '@markdoc/markdoc';
|
||||
|
||||
type Component = ComponentType<unknown>;
|
||||
|
||||
/**
|
||||
* @name CustomMarkdocComponents
|
||||
* @description Custom components for Markdoc. Please define your custom components here.
|
||||
* @example
|
||||
*
|
||||
* ```ts
|
||||
* function Youtube(props: { src: string }) { ... }
|
||||
*
|
||||
* export const CustomMarkdocComponents: Record<string, React.ComponentType<never>> = {
|
||||
* Youtube,
|
||||
* };
|
||||
*/
|
||||
export const CustomMarkdocComponents: Record<string, Component> = {
|
||||
// define your custom components here
|
||||
};
|
||||
|
||||
/**
|
||||
* @name CustomMarkdocTags
|
||||
* @description Custom tags for Markdoc. Please define your custom tags here.
|
||||
* @example
|
||||
* export const CustomMarkdocTags = {
|
||||
* youtube: {
|
||||
* render: "Youtube",
|
||||
* selfClosing: true,
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
export const CustomMarkdocTags: Record<string, Schema> = {
|
||||
// define your custom tags here
|
||||
};
|
||||
Reference in New Issue
Block a user