forked from MapComplete/MapComplete
More styling tweaks
This commit is contained in:
parent
9a412c6b74
commit
77ffdc093a
8 changed files with 85 additions and 58 deletions
34
UI/Base/ScrollableFullScreen.ts
Normal file
34
UI/Base/ScrollableFullScreen.ts
Normal file
|
@ -0,0 +1,34 @@
|
|||
import {UIElement} from "../UIElement";
|
||||
import Svg from "../../Svg";
|
||||
import State from "../../State";
|
||||
import Combine from "./Combine";
|
||||
|
||||
/**
|
||||
* Wraps some contents into a panel that scrolls the content _under_ the title
|
||||
*/
|
||||
export default class ScrollableFullScreen extends UIElement{
|
||||
private _component: Combine;
|
||||
|
||||
|
||||
constructor(title: UIElement, content: UIElement) {
|
||||
super();
|
||||
const returnToTheMap = Svg.back_svg().onClick(() => {
|
||||
State.state.fullScreenMessage.setData(undefined);
|
||||
State.state.selectedElement.setData(undefined);
|
||||
}).SetClass("only-on-mobile")
|
||||
.SetClass("featureinfobox-back-to-the-map")
|
||||
|
||||
this._component = new Combine([
|
||||
new Combine([returnToTheMap, title]).SetClass("featureinfobox-titlebar"),
|
||||
new Combine([content]).SetClass("featureinfobox-content")
|
||||
])
|
||||
this.SetClass("featureinfobox");
|
||||
|
||||
}
|
||||
|
||||
InnerRender(): string {
|
||||
return this._component.Render();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue