Skip to content

Commit e1303f8

Browse files
committed
tooltip added
1 parent a3f9e29 commit e1303f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+57
-50
lines changed

client/packages/lowcoder-design/src/components/Section.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const ShowChildren = styled.div<{ $show?: string; $noMargin?: boolean }>`
7474
padding-right: ${(props) => (props.$noMargin ? 0 : "16px")};
7575
`;
7676

77-
const TooltipWrapper = styled.a`
77+
const TooltipWrapper = styled.span`
7878
word-wrap: break-word;
7979
word-break: break-word;
8080
white-space: pre-wrap;
@@ -88,7 +88,7 @@ interface ISectionConfig<T> {
8888
style?: React.CSSProperties;
8989
children: T;
9090
additionalButton?: React.ReactNode;
91-
tooltip?:string
91+
hasTooltip?: boolean;
9292
}
9393

9494
export interface PropertySectionState {
@@ -110,8 +110,7 @@ export const PropertySectionContext = React.createContext<PropertySectionContext
110110
});
111111

112112
export const BaseSection = (props: ISectionConfig<ReactNode>) => {
113-
const { name,tooltip } = props;
114-
console.log("🚀 ~ BaseSection ~ name:", name)
113+
const { name,hasTooltip } = props;
115114
const { compName, state, toggle } = useContext(PropertySectionContext);
116115
const open = props.open !== undefined ? props.open : name ? state[compName]?.[name] !== false : true;
117116

@@ -136,7 +135,15 @@ export const BaseSection = (props: ISectionConfig<ReactNode>) => {
136135
</SectionLabelDiv>
137136
)}
138137
<Tooltip
139-
title={tooltip && <TooltipWrapper href={tooltip}>{tooltip}</TooltipWrapper>}
138+
title={
139+
hasTooltip && (
140+
<TooltipWrapper>
141+
Here you can enter the animation type codes. Like bounce, swing or
142+
tada. Read more about all possible codes at:{" "}
143+
<a href="https://animate.style">https://animate.style</a>
144+
</TooltipWrapper>
145+
)
146+
}
140147
arrow={{
141148
pointAtCenter: true,
142149
}}

client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ let AutoCompleteCompBase = (function () {
352352
</Section>
353353
<Section
354354
name={sectionNames.animationStyle}
355-
tooltip="https://animate.style/"
355+
hasTooltip={true}
356356
>
357357
{children.animationStyle.getPropertyView()}
358358
</Section>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ let FloatButtonBasicComp = (function () {
150150
<Section name={sectionNames.style}>
151151
{children.style.getPropertyView()}
152152
</Section>
153-
<Section name={sectionNames.animationStyle}>
153+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
154154
{children.animationStyle.getPropertyView()}
155155
</Section>
156156
</>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const LinkTmpComp = (function () {
139139
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
140140
<>
141141
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
142-
<Section name={sectionNames.animationStyle}>{children.animationStyle.getPropertyView()}</Section>
142+
<Section name={sectionNames.animationStyle} hasTooltip={true}>{children.animationStyle.getPropertyView()}</Section>
143143
</>
144144
)}
145145
</>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const ToggleTmpComp = (function () {
139139
})}
140140
{children.style.getPropertyView()}
141141
</Section>
142-
<Section name={sectionNames.animationStyle}>
142+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
143143
{children.animationStyle.getPropertyView()}
144144
</Section>
145145
</>

client/packages/lowcoder/src/comps/comps/carouselComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ let CarouselBasicComp = (function () {
108108
<Section name={sectionNames.style}>
109109
{children.style.getPropertyView()}
110110
</Section>
111-
<Section name={sectionNames.animationStyle}>
111+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
112112
{children.animationStyle.getPropertyView()}
113113
</Section>
114114
</>

client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ let CommentBasicComp = (function () {
424424
<Section name={sectionNames.style}>
425425
{children.style.getPropertyView()}
426426
</Section>
427-
<Section name={sectionNames.animationStyle}>
427+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
428428
{children.animationStyle.getPropertyView()}
429429
</Section></>
430430
)}

client/packages/lowcoder/src/comps/comps/containerComp/cardComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export const ContainerBaseComp = (function () {
333333
<Section name={sectionNames.bodyStyle}>
334334
{children.bodyStyle.getPropertyView()}
335335
</Section>
336-
<Section name={sectionNames.animationStyle}>
336+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
337337
{children.animationStyle.getPropertyView()}
338338
</Section>
339339
</>

client/packages/lowcoder/src/comps/comps/containerComp/pageLayoutComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const ContainerBaseComp = (function () {
5454
<Section name={sectionNames.style}>
5555
{ children.container.stylePropertyView() }
5656
</Section>
57-
<Section name={sectionNames.animationStyle}>
57+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
5858
{children.animationStyle.getPropertyView()}
5959
</Section>
6060
{children.container.children.showHeader.getView() && (

client/packages/lowcoder/src/comps/comps/containerComp/textContainerComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const ContainerBaseComp = (function () {
9696
<Section name={"Floating Text Style"}>
9797
{children.style.getPropertyView()}
9898
</Section>
99-
<Section name={sectionNames.animationStyle}>
99+
<Section name={sectionNames.animationStyle} hasTooltip={true}>
100100
{children.animationStyle.getPropertyView()}
101101
</Section>
102102
<Section name={"Container Style"}>

0 commit comments

Comments
 (0)