From 091a4f633928121d692609daaff8455957fd1bcf Mon Sep 17 00:00:00 2001 From: Daria Larionova Date: Mon, 13 Jan 2025 16:45:41 +0300 Subject: [PATCH] fix(Title): return class component (#243) --- src/plugins/Title/Title.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/Title/Title.tsx b/src/plugins/Title/Title.tsx index a9c50fb..a62ce08 100644 --- a/src/plugins/Title/Title.tsx +++ b/src/plugins/Title/Title.tsx @@ -20,9 +20,9 @@ export interface PluginTitleProps extends PluginWidgetProps { const b = cn('dashkit-plugin-title'); -export const PluginTitle = React.forwardRef( - function PluginTitleForwardRef(props, ref) { - const {data} = props; +export class PluginTitle extends React.Component { + render() { + const {data} = this.props; const text = data.text ? data.text : ''; const size = isCustomSize(data.size) ? false : data.size; @@ -38,7 +38,6 @@ export const PluginTitle = React.forwardRef( return (
( {text}
); - }, -); + } +} const plugin: Plugin = { type: 'title',