Skip to content

Commit

Permalink
Update: Text align for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Jan 9, 2025
1 parent 903e028 commit 1298e49
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 54 deletions.
26 changes: 22 additions & 4 deletions Resources/Private/RangeEditor/RangeEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ const styles = stylex.create({
outlineOffset: 2,
},
},
textLeft: {
textAlign: "left",
},
textRight: {
textAlign: "right",
},
textfield: {
background: colors.neutral,
border: 0,
Expand Down Expand Up @@ -415,7 +421,10 @@ function Editor({
)}
onClick={() => changeValue(options.min)}
disabled={disabled}
{...stylex.props(styles.editorValueButton)}
{...stylex.props(
styles.editorValueButton,
styles.textLeft,
)}
>
{valueAsString}%
</button>
Expand All @@ -426,7 +435,10 @@ function Editor({
)}
onClick={() => changeValue(options.max)}
disabled={disabled}
{...stylex.props(styles.editorValueButton)}
{...stylex.props(
styles.editorValueButton,
styles.textRight,
)}
>
{100 - value}%
</button>
Expand All @@ -447,7 +459,10 @@ function Editor({
: 0.7,
}}
disabled={disabled}
{...stylex.props(styles.editorValueButton)}
{...stylex.props(
styles.editorValueButton,
styles.textLeft,
)}
>
{getLabel(options.min, true)}
</button>
Expand Down Expand Up @@ -521,7 +536,10 @@ function Editor({
: 0.7,
}}
disabled={disabled}
{...stylex.props(styles.editorValueButton)}
{...stylex.props(
styles.editorValueButton,
styles.textRight,
)}
>
{getLabel(options.max, true)}
</button>
Expand Down
3 changes: 3 additions & 0 deletions Resources/Public/Plugin.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@property --marginRight { syntax: "*"; inherits: false; initial-value: "*";}
@property --width { syntax: "*"; inherits: false; initial-value: "*";}
:root, .range-39wzrw{--range-17fcymb:var(--transition-Default);--range-1qkce6e:cubic-bezier(0.4, 0, 0.2, 1);}
:root, .range-1ow9cle{--range-1yfsa84:var(--colors-PrimaryBlue);--range-11ai139:var(--colors-ContrastNeutral);--range-3rq551:var(--colors-ContrastBright);--range-112jqwz:var(--colors-ContrastBrightest);--range-5uow9g:var(--colors-ContrastDarkest);--range-1aufrmy:var(--colors-Warn);}
.range-jcvozh{--color:var(--range-1yfsa84)}
Expand Down Expand Up @@ -37,6 +39,7 @@
.range-1qughib:not(#\#):not(#\#):not(#\#){justify-content:space-between}
.range-190dgpg:not(#\#):not(#\#):not(#\#){opacity:.65}
.range-2b8uid:not(#\#):not(#\#):not(#\#){text-align:center}
.range-dpxx8g:not(#\#):not(#\#):not(#\#){text-align:left}
.range-1hr2gdg:not(#\#):not(#\#):not(#\#){text-align:right}
.range-87ps6o:not(#\#):not(#\#):not(#\#){user-select:none}
.range-xeqyu3:focus-within:not(#\#):not(#\#):not(#\#){color:var(--range-5uow9g)}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/RangeEditor.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ const options = {
"Resources/Public/Plugin.css",
),
stylexImports: ["@stylexjs/stylex"],
unstable_moduleResolution: {
type: "commonJS",
rootDir: __dirname,
},
}),
],
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
},
"devDependencies": {
"@neos-project/neos-ui-extensibility": "~8.3.11",
"@stylexjs/esbuild-plugin": "^0.9.3",
"@stylexjs/esbuild-plugin": "^0.10.0",
"esbuild": "^0.24.2",
"prettier": "^3.4.2"
},
"dependencies": {
"@stylexjs/stylex": "^0.9.3",
"@stylexjs/stylex": "^0.10.0",
"use-debounce": "^10.0.4"
},
"peerDependencies": {
Expand Down
86 changes: 43 additions & 43 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1298e49

Please sign in to comment.