forked from MapComplete/MapComplete
Add Tailwind button for save+cancel
- remove custom styles - add new button styles based on Tailwind classes using @apply - extend config to allow hover:ring-blue-200 and such - update the js-files to use new classes - Only unsure about the `.review-form .save-non-active`, this might need additional Tailwind helper classes in this specific situation. Don't know where it shows up, so could not test.
This commit is contained in:
parent
2342d369d0
commit
4068931bba
7 changed files with 29 additions and 39 deletions
|
@ -22,15 +22,14 @@ export class SaveButton extends UIElement {
|
|||
}
|
||||
|
||||
InnerRender(): string {
|
||||
let clss = "save";
|
||||
|
||||
if(this._userDetails != undefined && !this._userDetails.data.loggedIn){
|
||||
return this._friendlyLogin.Render();
|
||||
}
|
||||
let inactive_class = ''
|
||||
if (this._value.data === false || (this._value.data ?? "") === "") {
|
||||
clss = "save-non-active";
|
||||
inactive_class = "btn-disabled";
|
||||
}
|
||||
return Translations.t.general.save.Clone().SetClass(clss).Render();
|
||||
return Translations.t.general.save.Clone().SetClass(`btn ${inactive_class}`).Render();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue