feat: 品牌裁剪弹窗/Markdown 行内短代码与详情视频块等
新增: - BrandCropModal 品牌图裁剪弹窗 + cropImage 工具 - Markdown 行内短代码(inlineShortcodes + remark 插件) - MdDetails 折叠块、MdVideo 视频块组件 - directiveBlocks/inlineShortcodes 测试 其它: - 聊天后端(handler/service chat)调整 - Markdown 渲染链路、编辑器、全局样式与品牌相关面板更新
This commit is contained in:
24
frontend/components/markdown/MdDetails.tsx
Normal file
24
frontend/components/markdown/MdDetails.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
type MdDetailsProps = {
|
||||
title: string;
|
||||
/** 正文已渲染的 React 节点(markdown);空正文可不传 */
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
/**
|
||||
* [details 标题]…[/details] 折叠面板:原生 details/summary,无 JS、SSR 友好。
|
||||
* 正文 markdown 由调用方(MarkdownBody / MarkdownBodyClient)渲染后传入。
|
||||
*/
|
||||
export default function MdDetails({ title, children }: MdDetailsProps) {
|
||||
return (
|
||||
<details className="j13-md-details">
|
||||
<summary>
|
||||
<ChevronDown size={15} className="j13-md-details-caret" aria-hidden />
|
||||
<span className="j13-md-details-title">{title}</span>
|
||||
</summary>
|
||||
{children ? <div className="j13-md-details-body">{children}</div> : null}
|
||||
</details>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user