Skip to content

Commit

Permalink
number input mode 1 updated (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
RubirajAccenture authored Nov 21, 2023
1 parent 1b0235e commit b56a04b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
25 changes: 21 additions & 4 deletions packages/ui-library/src/components/forms/number-input/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const { tokenizedLight: wrapperLight, tokenizedDark: wrapperDark } = rend
}
&.mode1 {
display: grid;
grid-template-columns: 10% 40% 40% 10%;
&.sm {
> .custom-stepper-button {
width: ${StepperCombo.SM.Vertical.Width};
Expand All @@ -38,8 +41,17 @@ export const { tokenizedLight: wrapperLight, tokenizedDark: wrapperDark } = rend
width: ${StepperCombo.LG.Vertical.Width};
}
}
> .unit {
text-align: left;
}
> input {
text-align: right;
}
}
> .unit,
input {
&.sm {
Expand Down Expand Up @@ -277,15 +289,20 @@ export const baseStyle = typeSafeNestedCss`
}
.unit {
order: -1;
order: 0;
}
.unit.prepend {
order: 0;
order: -1;
text-align: right;
}
& > input {
text-align: center;
> input.prepend {
text-align: left;
}
> button:last-of-type {
margin-left:auto;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export class BlrNumberInput extends LitElement {
: [wrapperDark, actionDark, StepperComboDark];

const inputClasses = classMap({
[`${this.size}`]: this.size,
[this.size]: this.size,
prepend: !!this.prependUnit,
});

const unitClasses = classMap({
Expand Down

0 comments on commit b56a04b

Please sign in to comment.