Skip to content

Commit 992fb1b

Browse files
authored
refactor(ui5-dialog): remove sap-phone classes (#200)
1 parent cadf996 commit 992fb1b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/main/src/DialogTemplateContext.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { isPhone } from "@ui5/webcomponents-core/dist/sap/ui/Device";
2+
13
class DialogTemplateContext {
24
static calculate(state) {
35
const context = {
@@ -11,6 +13,7 @@ class DialogTemplateContext {
1113
dialogParent: {
1214
sapMDialogParent: true,
1315
sapMDialogStretched: state.stretch,
16+
"ui5-phone": isPhone(),
1417
},
1518
main: {
1619
sapMPopup: true,

packages/main/src/themes/base/Dialog.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
}
2828

29-
.sap-phone .sapMDialogParent.sapMDialogStretched .sapMDialog {
29+
.ui5-phone.sapMDialogParent.sapMDialogStretched .sapMDialog {
3030
width: 100%;
3131
height: 100%;
3232
box-shadow: none;

packages/main/test/sap/ui/webcomponents/main/pages/Dialog.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
54
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
67

78
<title>Dialog</title>
89

@@ -22,7 +23,7 @@
2223
<body>
2324
<ui5-button id="btnOpenDialog">Open Dialog</ui5-button>
2425

25-
<ui5-dialog id="dialog" header-text="Dialog">
26+
<ui5-dialog id="dialog" header-text="Dialog" stretch>
2627
<div style="padding: 1rem;text-align: center;">
2728
<ui5-title level="H2">Hello World!</ui5-title>
2829
</div>

0 commit comments

Comments
 (0)