Skip to content

Commit

Permalink
fix(ui5-input): adjust value state paddings according to specificatio…
Browse files Browse the repository at this point in the history
…ns (#3833)

The padding of the value state message popup and header are fixed to reflect the Fiori specifications.

Fixes: #3611
Closes: #3611
  • Loading branch information
ndeshev authored and ilhan007 committed Sep 16, 2021
1 parent cce6ca8 commit 48bd6fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,8 @@ class Input extends UI5Element {
return {
popoverValueState: {
"ui5-valuestatemessage-root": true,
"ui5-responsive-popover-header": !this.isOpen(),
"ui5-valuestatemessage-header": true,
"ui5-responsive-popover-header": !this.isValueStateOpened(),
"ui5-valuestatemessage--success": this.valueState === ValueState.Success,
"ui5-valuestatemessage--error": this.valueState === ValueState.Error,
"ui5-valuestatemessage--warning": this.valueState === ValueState.Warning,
Expand All @@ -1185,7 +1186,6 @@ class Input extends UI5Element {
suggestionPopoverHeader: {
"display": this._listWidth === 0 ? "none" : "inline-block",
"width": `${this._listWidth}px`,
"padding": "0.925rem 1rem",
},
suggestionsPopover: {
"max-width": `${this._inputWidth}px`,
Expand Down
9 changes: 7 additions & 2 deletions packages/main/src/themes/ValueStateMessage.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.ui5-valuestatemessage-popover {
min-height: 1rem;
box-shadow: none;
}

Expand All @@ -9,13 +8,19 @@
color: var(--sapTextColor);
font-size: var(--sapFontSmallSize);
font-family: "72override", var(--sapFontFamily);
padding: .3rem .625rem;
height: auto;
padding: .5rem;
overflow: hidden;
text-overflow: ellipsis;
min-width: 6.25rem;
border: var(--_ui5_value_state_message_border);
}

ui5-responsive-popover .ui5-valuestatemessage-header {
min-height: 2rem;
padding: .5625rem 1rem;
}

.ui5-valuestatemessage--success {
background: var(--sapSuccessBackground);
}
Expand Down

0 comments on commit 48bd6fe

Please sign in to comment.