File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
apps/builder/app/builder/features
style-panel/sections/advanced Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 ScrollArea ,
1111 SmallIconButton ,
1212 styled ,
13+ Text ,
1314 theme ,
1415 toast ,
1516 Tooltip ,
@@ -26,7 +27,11 @@ import {
2627 WsComponentMeta ,
2728} from "@webstudio-is/react-sdk" ;
2829import { ROOT_INSTANCE_ID , type Instance } from "@webstudio-is/sdk" ;
29- import { EyeconClosedIcon , EyeconOpenIcon } from "@webstudio-is/icons" ;
30+ import {
31+ EyeconClosedIcon ,
32+ EyeconOpenIcon ,
33+ InfoCircleIcon ,
34+ } from "@webstudio-is/icons" ;
3035import {
3136 $dragAndDropState ,
3237 $editingItemSelector ,
@@ -476,6 +481,21 @@ export const NavigatorTree = () => {
476481 onClick : ( ) => $selectedInstanceSelector . set ( [ ROOT_INSTANCE_ID ] ) ,
477482 onFocus : ( ) => $selectedInstanceSelector . set ( [ ROOT_INSTANCE_ID ] ) ,
478483 } }
484+ action = {
485+ < Tooltip
486+ variant = "wrapped"
487+ side = "bottom"
488+ disableHoverableContent = { true }
489+ content = {
490+ < Text >
491+ Variables defined on Global Root are available on every
492+ instance on every page.
493+ </ Text >
494+ }
495+ >
496+ < InfoCircleIcon />
497+ </ Tooltip >
498+ }
479499 >
480500 < TreeNodeLabel prefix = { < MetaIcon icon = { rootMeta . icon } /> } >
481501 { rootMeta . label }
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const AdvancedSearch = ({
157157 itemToString = { ( item ) => item ?. label ?? "" }
158158 getItemProps = { ( ) => ( { text : "sentence" } ) }
159159 getDescription = { ( item ) => {
160- let description = `Unknown CSS property .` ;
160+ let description = `Create CSS variable .` ;
161161 if ( item && item . value in propertyDescriptions ) {
162162 description =
163163 propertyDescriptions [
@@ -201,7 +201,7 @@ const AdvancedPropertyLabel = ({ property }: { property: StyleProperty }) => {
201201 } }
202202 content = {
203203 < PropertyInfo
204- title = { label }
204+ title = { property . startsWith ( "--" ) ? "CSS Variable" : label }
205205 description = { description }
206206 styles = { [ styleDecl ] }
207207 onReset = { ( ) => {
You can’t perform that action at this time.
0 commit comments