Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ac60a2

Browse files
authored
Merge pull request#1707 from kamalqureshi/tooltip_for_buttons
Tooltips - Properties view
2 parentsb19ebe7 +937acc4 commit4ac60a2

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

‎client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const childrenMap = {
134134
style:ButtonStyleControl,
135135
animationStyle:styleControl(AnimationStyle,'animationStyle'),
136136
viewRef:RefControl<HTMLElement>,
137+
tooltip:StringControl
137138
};
138139

139140
typeChildrenType=NewChildren<RecordConstructorToComp<typeofchildrenMap>>;
@@ -146,6 +147,7 @@ const ButtonPropertyView = React.memo((props: {
146147
<>
147148
<Sectionname={sectionNames.basic}>
148149
{props.children.text.propertyView({label:trans("text")})}
150+
{props.children.tooltip.propertyView({label:trans("labelProp.tooltip")})}
149151
</Section>
150152

151153
{(editorModeStatus==="logic"||editorModeStatus==="both")&&(
@@ -204,7 +206,7 @@ const ButtonView = React.memo((props: ToViewReturn<ChildrenType>) => {
204206
<ButtonCompWrapper$disabled={props.disabled}>
205207
<EditorContext.Consumer>
206208
{(editorState)=>(
207-
<Tooltiptitle={props.text}>
209+
<Tooltiptitle={props.tooltip}>
208210
<Button100
209211
ref={props.viewRef}
210212
$buttonStyle={props.style}

‎client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const ToggleTmpComp = (function () {
6666
animationStyle:styleControl(AnimationStyle,'animationStyle'),
6767
showBorder:withDefault(BoolControl,true),
6868
viewRef:RefControl<HTMLElement>,
69+
tooltip:StringControl,
6970
};
7071
returnnewUICompBuilder(childrenMap,(props)=>{
7172
consttext=props.showText
@@ -79,7 +80,7 @@ const ToggleTmpComp = (function () {
7980
$showBorder={props.showBorder}
8081
$animationStyle={props.animationStyle}
8182
>
82-
<Tooltiptitle={props.value.value ?props.trueText :props.falseText}>
83+
<Tooltiptitle={props.tooltip}>
8384
<Button100
8485
ref={props.viewRef}
8586
$buttonStyle={props.style}
@@ -117,6 +118,7 @@ const ToggleTmpComp = (function () {
117118
</Section>
118119
<Sectionname={sectionNames.advanced}>
119120
{children.showText.propertyView({label:trans("toggleButton.showText")})}
121+
{children.tooltip.propertyView({label:trans("labelProp.tooltip")})}
120122
{children.showText.getView()&&
121123
children.trueText.propertyView({label:trans("toggleButton.trueLabel")})}
122124
{children.showText.getView()&&

‎client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ const childrenMap = {
201201
iconScoutAsset:IconscoutControl(AssetType.ICON),
202202
style:ButtonStyleControl,
203203
viewRef:RefControl<HTMLElement>,
204-
restrictPaddingOnRotation:withDefault(StringControl,'controlButton')
204+
restrictPaddingOnRotation:withDefault(StringControl,'controlButton'),
205+
tooltip:StringControl
205206
};
206207

207208
letButtonTmpComp=(function(){
@@ -259,7 +260,7 @@ let ButtonTmpComp = (function () {
259260
:undefined
260261
}
261262
>
262-
<Tooltiptitle={trans("meeting.meetingControlCompName")}>
263+
<Tooltiptitle={props.tooltip}>
263264
<Button100
264265
ref={props.viewRef}
265266
$buttonStyle={props.style}
@@ -323,6 +324,9 @@ let ButtonTmpComp = (function () {
323324
{children.sourceMode.getView()==='asset-library'&&children.iconScoutAsset.propertyView({
324325
label:trans("button.icon"),
325326
})}
327+
{children.tooltip.propertyView({
328+
label:trans("labelProp.tooltip"),
329+
})}
326330
</Section>
327331

328332
{(useContext(EditorContext).editorModeStatus==="logic"||

‎client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,7 @@ let CheckboxBasicComp = (function () {
231231
returnprops.options
232232
.filter((option)=>option.value!==undefined&&!option.hidden)
233233
.map((option)=>({
234-
label:(
235-
<Tooltiptitle={option.label}>
236-
<span>{option.label}</span>
237-
</Tooltip>
238-
),
234+
label:option.label,
239235
value:option.value,
240236
disabled:option.disabled,
241237
}));

‎client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ const MemoizedRadio = memo(({
134134
returnoptions
135135
.filter((option)=>option.value!==undefined&&!option.hidden)
136136
.map((option)=>({
137-
label:(
138-
<Tooltiptitle={option.label}>
139-
<span>{option.label}</span>
140-
</Tooltip>
141-
),
137+
label:option.label,
142138
value:option.value,
143139
disabled:option.disabled,
144140
}));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp