Skip to content

Commit

Permalink
Upgrade: Render help icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Oct 16, 2024
1 parent 956fd9c commit a9b9a54
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 95 deletions.
10 changes: 7 additions & 3 deletions Resources/Private/Editor/ColorPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const styles = stylex.create({
// @ts-ignore
function Editor(props) {
const mergedOptions = { ...defaultOptions, ...props.config, ...props.options };
const { value, commit, highlight, i18nRegistry, id, dataSourcesDataLoader } = props;
const { value, commit, highlight, i18nRegistry, id, dataSourcesDataLoader, renderHelpIcon } = props;
const label = i18nRegistry.translate(props.label);
const { mode, precision, dataSourceIdentifier, dataSourceUri, dataSourceAdditionalData } = mergedOptions;
if (mode !== "coords" && mode !== "hex" && mode !== "all" && mode !== "oklch") {
Expand Down Expand Up @@ -202,7 +202,9 @@ function Editor(props) {
if (isLoading) {
return (
<>
<Label htmlFor={id}>{label}</Label>
<Label htmlFor={id}>
{label} {renderHelpIcon()}
</Label>
<div
{...stylex.props(styles.loading)}
id={id}
Expand All @@ -220,7 +222,9 @@ function Editor(props) {

return (
<>
<Label htmlFor={id}>{label}</Label>
<Label htmlFor={id}>
{label} {renderHelpIcon()}
</Label>
<div
{...stylex.props(styles.wrapper, options.disabled && styles.disabled, enableCollapsed && styles.noGap)}
>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/Plugin.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Resources/Public/Plugin.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"watch": "node build.mjs --watch"
},
"devDependencies": {
"@neos-project/neos-ui-extensibility": "~8.3.10",
"@neos-project/react-ui-components": "^8.3.10",
"@neos-project/neos-ui-extensibility": "~8.3.11",
"@neos-project/react-ui-components": "^8.3.11",
"@stylexjs/esbuild-plugin": "^0.8.0",
"@stylexjs/stylex": "^0.8.0",
"@types/nearest-color": "^0.4.1",
Expand All @@ -21,6 +21,6 @@
"onchange": "^7.1.0",
"prettier": "^3.3.3",
"react-colorful": "^5.6.1",
"typescript-eslint": "^8.8.1"
"typescript-eslint": "^8.9.0"
}
}
Loading

0 comments on commit a9b9a54

Please sign in to comment.