Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: tooltips on background, box-shadow and transitions titles (#2699)

Jaya Krishna Namburued332ec37dbe
diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx
index 7167923256..cff66034d2 100644
--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx
+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx
@@ -177,7 +177,7 @@ const BackgroundsCollapsibleSection = ({
<PropertyName
style={currentStyle}
title="Backgrounds"
- description="Sets background color, image or gradient and composes them with layers"
+ description="Add one or more backgrounds to the instance such as a color, image, or gradient."
properties={layeredBackgroundProps}
label={
<SectionTitleLabel color={layersStyleSource}>
diff --git a/apps/builder/app/builder/features/style-panel/sections/box-shadows/box-shadows.tsx b/apps/builder/app/builder/features/style-panel/sections/box-shadows/box-shadows.tsx
index 54df9770b8..563621a29a 100644
--- a/apps/builder/app/builder/features/style-panel/sections/box-shadows/box-shadows.tsx
+++ b/apps/builder/app/builder/features/style-panel/sections/box-shadows/box-shadows.tsx
@@ -54,6 +54,7 @@ export const BoxShadowsSection = (props: RenderCategoryProps) => {
title="Box Shadows"
style={currentStyle}
properties={[property]}
+ description="Adds shadow effects around an element's frame."
label={
<SectionTitleLabel color={layersStyleSource}>
{label}
diff --git a/apps/builder/app/builder/features/style-panel/sections/transitions/transitions.tsx b/apps/builder/app/builder/features/style-panel/sections/transitions/transitions.tsx
index 29bac8df54..8bd7c20cba 100644
--- a/apps/builder/app/builder/features/style-panel/sections/transitions/transitions.tsx
+++ b/apps/builder/app/builder/features/style-panel/sections/transitions/transitions.tsx
@@ -46,7 +46,13 @@ export const TransitionSection = (props: RenderCategoryProps) => {
<SectionTitle
dots={getDots(currentStyle, [property])}
suffix={
- <Tooltip content={"Transitions can only be added in local state"}>
+ <Tooltip
+ content={
+ isStyleInLocalState === false
+ ? "Transitions can only be added in local state"
+ : "Add a transition"
+ }
+ >
<SectionTitleButton
disabled={isStyleInLocalState === false}
prefix={<PlusIcon />}
@@ -67,6 +73,7 @@ export const TransitionSection = (props: RenderCategoryProps) => {
<PropertyName
title={label}
style={currentStyle}
+ description="Animate the transition between states on this instance."
properties={[property]}
label={
<SectionTitleLabel color={layersStyleSource}>
diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsx
index c3161902ce..654269a64f 100644
--- a/packages/design-system/src/components/label.tsx
+++ b/packages/design-system/src/components/label.tsx
@@ -121,11 +121,7 @@ type Props = {
children: ReactNode;
} & ComponentProps<typeof StyledLabel>;
-export const isLabelButton = (color: Props["color"]) =>
- color === "preset" ||
- color === "local" ||
- color === "overwritten" ||
- color === "remote";
+export const isLabelButton = (color: Props["color"]) => color !== undefined;
export const Label = forwardRef((props: Props, ref: Ref<HTMLLabelElement>) => {
const { disabled, children, ...rest } = props;