Skip to content

Commit d28428e

Browse files
authored
feat: Add mdn link to all properties in advanced style panel (#4951)
## Description The little link icon button <img width="276" alt="image" src="https://github.com/user-attachments/assets/5553a892-a3b7-46ae-b00a-c56c1a7833cf" /> ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent d5edc48 commit d28428e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/builder/app/builder/shared/css-editor/css-editor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ const AdvancedPropertyLabel = ({
6363
onDeleteProperty: DeleteProperty;
6464
}) => {
6565
const styleDecl = useComputedStyleDecl(property);
66+
const [isOpen, setIsOpen] = useState(false);
67+
6668
const description = propertyDescriptions[camelCaseProperty(property)];
69+
const styleConfig = styleConfigByName(property);
6770

68-
const [isOpen, setIsOpen] = useState(false);
6971
return (
7072
<Tooltip
7173
open={isOpen}
@@ -94,6 +96,7 @@ const AdvancedPropertyLabel = ({
9496
onReset?.();
9597
}}
9698
resetType="delete"
99+
link={styleConfig?.mdnUrl}
97100
/>
98101
}
99102
>

0 commit comments

Comments
 (0)