mapcomplete/UI/FullScreenMessageBoxHandler.ts
Tobias 7a2f4fa44a Migrate featureinfobox to Tailwind
- migrate featureinfobox to Tailwind
- migrate featureinfobox-content to Tailwind
- migrate fullscreenmessage-content to Tailwind so we can delete css/fullscreenmessagebox.css

The landscape-mode is somethign that Tailwind does not support AFAIK. Instead, I migrated the one css-definition that was left over but required to a tailwind-like class name `.landscape\:max-h-screen`. Note the escaped colon with is required so css supports colon based class names.
2021-01-21 05:05:10 +01:00

31 lines
No EOL
806 B
TypeScript

import {UIElement} from "./UIElement";
import State from "../State";
import Combine from "./Base/Combine";
/**
* Handles the full screen popup on mobile
*/
export default class FullScreenMessageBox extends UIElement {
private _content: UIElement;
constructor() {
super(State.state.fullScreenMessage);
this.HideOnEmpty(true);
}
InnerRender(): string {
if (State.state.fullScreenMessage.data === undefined) {
return "";
}
this._content = State.state.fullScreenMessage.data.content;
return new Combine([this._content]).SetClass("block max-h-screen h-screen overflow-x-hidden overflow-y-auto bg-white p-2").Render();
}
protected InnerUpdate(htmlElement: HTMLElement) {
super.InnerUpdate(htmlElement);
}
}