From 937acc4340b1340fc0bdd1d0423ea560419b6060 Mon Sep 17 00:00:00 2001 From: Kamal Qureshi Date: Sun, 25 May 2025 02:19:57 +0500 Subject: [PATCH] Tooltips section added in properties view --- .../lowcoder/src/comps/comps/buttonComp/buttonComp.tsx | 4 +++- .../src/comps/comps/buttonComp/toggleButtonComp.tsx | 4 +++- .../src/comps/comps/meetingComp/controlButton.tsx | 8 ++++++-- .../src/comps/comps/selectInputComp/checkboxComp.tsx | 6 +----- .../src/comps/comps/selectInputComp/radioComp.tsx | 6 +----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx b/client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx index 5c2f08386..6f657c1e8 100644 --- a/client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx @@ -134,6 +134,7 @@ const childrenMap = { style: ButtonStyleControl, animationStyle: styleControl(AnimationStyle, 'animationStyle'), viewRef: RefControl, + tooltip: StringControl }; type ChildrenType = NewChildren>; @@ -146,6 +147,7 @@ const ButtonPropertyView = React.memo((props: { <>
{props.children.text.propertyView({ label: trans("text") })} + {props.children.tooltip.propertyView({ label: trans("labelProp.tooltip")})}
{(editorModeStatus === "logic" || editorModeStatus === "both") && ( @@ -204,7 +206,7 @@ const ButtonView = React.memo((props: ToViewReturn) => { {(editorState) => ( - + , + tooltip: StringControl, }; return new UICompBuilder(childrenMap, (props) => { const text = props.showText @@ -79,7 +80,7 @@ const ToggleTmpComp = (function () { $showBorder={props.showBorder} $animationStyle={props.animationStyle} > - +
{children.showText.propertyView({ label: trans("toggleButton.showText") })} + {children.tooltip.propertyView({label: trans("labelProp.tooltip")})} {children.showText.getView() && children.trueText.propertyView({ label: trans("toggleButton.trueLabel") })} {children.showText.getView() && diff --git a/client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx b/client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx index bfc0f8f95..313358815 100644 --- a/client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx +++ b/client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx @@ -201,7 +201,8 @@ const childrenMap = { iconScoutAsset: IconscoutControl(AssetType.ICON), style: ButtonStyleControl, viewRef: RefControl, - restrictPaddingOnRotation:withDefault(StringControl, 'controlButton') + restrictPaddingOnRotation:withDefault(StringControl, 'controlButton'), + tooltip: StringControl }; let ButtonTmpComp = (function () { @@ -259,7 +260,7 @@ let ButtonTmpComp = (function () { : undefined } > - + {(useContext(EditorContext).editorModeStatus === "logic" || diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx index fd02cb40c..9a7abb8bd 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx @@ -231,11 +231,7 @@ let CheckboxBasicComp = (function () { return props.options .filter((option) => option.value !== undefined && !option.hidden) .map((option) => ({ - label: ( - - {option.label} - - ), + label: option.label, value: option.value, disabled: option.disabled, })); diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx index 8bfe2a7b9..28d5d6f3d 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx @@ -134,11 +134,7 @@ const MemoizedRadio = memo(({ return options .filter((option) => option.value !== undefined && !option.hidden) .map((option) => ({ - label: ( - - {option.label} - - ), + label: option.label, value: option.value, disabled: option.disabled, }));