forked from MapComplete/MapComplete
Move border custom css to Tailwind Class
- migrate custom css to Tailwind class - introduce class-parameter for `AsImageElement` - migrate width of login button to Tailwind class
This commit is contained in:
parent
d3b39fbe54
commit
871f512c0d
8 changed files with 12 additions and 25 deletions
|
@ -4,16 +4,16 @@ import {Utils} from "../../Utils";
|
|||
export default class Img {
|
||||
|
||||
public static runningFromConsole = false;
|
||||
|
||||
|
||||
static AsData(source:string){
|
||||
if(Utils.runningFromConsole){
|
||||
return source;
|
||||
}
|
||||
return `data:image/svg+xml;base64,${(btoa(source))}`;
|
||||
}
|
||||
|
||||
static AsImageElement(source: string): string{
|
||||
return `<img src="${Img.AsData(source)}">`;
|
||||
|
||||
static AsImageElement(source: string, css_class: string): string{
|
||||
return `<img class="${css_class}" alt="" src="${Img.AsData(source)}">`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export default class UserBadge extends UIElement {
|
|||
|
||||
this._loginButton = Translations.t.general.loginWithOpenStreetMap
|
||||
.Clone()
|
||||
.SetClass("userbadge-login")
|
||||
.SetClass("userbadge-login pt-3 w-full")
|
||||
.onClick(() => State.state.osmConnection.AttemptLogin());
|
||||
this._logout =
|
||||
Svg.logout_svg()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue