This commit is contained in:
2025-03-22 17:15:35 +00:00
parent 0e11c4153d
commit 8a54bb29fb
11 changed files with 204 additions and 32 deletions

View File

@@ -3,7 +3,14 @@ import { DraggablePropsType } from '../../components/Draggable/Draggable';
export const id = "text";
export const name = "文字";
export const version = "1.0.0";
export const version = "1.0.0";
export const defaultConfig = (config: FontData) => {
return {
textAlign: 'center',
content: '默认文本',
...config,
}
}
type FontData = {
content: string;
fontSize?: number; // 字体大小px
@@ -21,7 +28,7 @@ interface ResponsiveTextProps {
className?: string; // 外部容器类名
}
const Text: React.FC<ResponsiveTextProps> = ({
const WidgetsText: React.FC<ResponsiveTextProps> = ({
data,
className
}) => {
@@ -76,4 +83,4 @@ const Text: React.FC<ResponsiveTextProps> = ({
);
};
export default Text;
export default WidgetsText;