Skip to content

Commit

Permalink
fix(NcModal): make dark header configurable
Browse files Browse the repository at this point in the history
Required to fix regression with Text in Viewer in Nextcloud 30, where we
still want a white viewer header.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Sep 15, 2024
1 parent d3c2377 commit 94baa37
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/NcModal/NcModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default {
tabindex="-1">
<!-- Header -->
<transition name="fade-visibility" appear>
<div class="modal-header" data-theme-dark>
<div class="modal-header" v-bind="dataThemeDarkAttr">
<h2 v-if="name.trim() !== ''"
:id="'modal-name-' + randId"
class="modal-header__name">
Expand Down Expand Up @@ -455,6 +455,14 @@ export default {
default: false,
},
/**
* Make the modal header appear dark.
*/
darkHeader: {
type: Boolean,
default: true,
},
/**
* Selector for the modal container, pass `null` to prevent automatic container mounting
*/
Expand Down Expand Up @@ -568,6 +576,11 @@ export default {
nextButtonAriaLabel() {
return t('Next')
},
dataThemeDarkAttr() {
return this.darkHeader
? { 'data-theme-dark': true }
: {}
},
},
watch: {
Expand Down

0 comments on commit 94baa37

Please sign in to comment.