41db1 submission editor theme fix (#500)

* fix password reset bug

* fix: themes on submission editor
This commit is contained in:
Favour Olayinka
2024-07-24 08:50:42 +01:00
committed by GitHub
parent 91037ab242
commit 5f320fbc23
4 changed files with 39 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import { themes } from "~/lib/forms/themes/form-themes.js"
import CachedDefaultTheme from "~/lib/forms/themes/CachedDefaultTheme.js"
import { default as _has } from "lodash/has"
export default {
@@ -14,7 +14,15 @@ export default {
uppercaseLabels: { type: Boolean, default: false },
help: { type: String, default: null },
helpPosition: { type: String, default: "below_input" },
theme: { type: Object, default: () => themes.default },
theme: {
type: Object, default: () => {
const theme = inject("theme", null)
if (theme) {
return theme.value
}
return CachedDefaultTheme.getInstance()
}
},
color: { type: String, default: "#3B82F6" },
wrapperClass: { type: String, default: "relative mb-3" },
},