Skip to content

Commit

Permalink
refactor(ui5-dialog): remove sap-phone classes (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
MapTo0 authored Mar 19, 2019
1 parent cadf996 commit 992fb1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/main/src/DialogTemplateContext.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { isPhone } from "@ui5/webcomponents-core/dist/sap/ui/Device";

class DialogTemplateContext {
static calculate(state) {
const context = {
Expand All @@ -11,6 +13,7 @@ class DialogTemplateContext {
dialogParent: {
sapMDialogParent: true,
sapMDialogStretched: state.stretch,
"ui5-phone": isPhone(),
},
main: {
sapMPopup: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/themes/base/Dialog.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
}

.sap-phone .sapMDialogParent.sapMDialogStretched .sapMDialog {
.ui5-phone.sapMDialogParent.sapMDialogStretched .sapMDialog {
width: 100%;
height: 100%;
box-shadow: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Dialog</title>

Expand All @@ -22,7 +23,7 @@
<body>
<ui5-button id="btnOpenDialog">Open Dialog</ui5-button>

<ui5-dialog id="dialog" header-text="Dialog">
<ui5-dialog id="dialog" header-text="Dialog" stretch>
<div style="padding: 1rem;text-align: center;">
<ui5-title level="H2">Hello World!</ui5-title>
</div>
Expand Down

0 comments on commit 992fb1b

Please sign in to comment.