docs: add comments to the src/components directory
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
/*
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-02 15:16:14
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-02 15:16:14
|
||||
*/
|
||||
/**
|
||||
* Svg Component
|
||||
*
|
||||
* Renders SVG content from string using dangerouslySetInnerHTML.
|
||||
* Used for displaying SVG code blocks in markdown.
|
||||
*
|
||||
* @component
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
/** Props interface for Svg component */
|
||||
interface SvgProps {
|
||||
content: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 渲染SVG内容的组件
|
||||
*/
|
||||
/** Component for rendering SVG content from string */
|
||||
function Svg(props: SvgProps): JSX.Element {
|
||||
const { content } = props;
|
||||
// console.log('Svg', props)
|
||||
|
||||
return React.createElement(
|
||||
'div',
|
||||
|
||||
Reference in New Issue
Block a user