Skip to content

Commit 4ab865f

Browse files
authored
Merge pull request #588 from kiva/fix-sidesheet-content-height-MP-1677
fix: sidesheet content height in mobile
2 parents 011cfb7 + 8b58dc2 commit 4ab865f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

@kiva/kv-components/src/vue/KvSideSheet.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ export default {
195195
return false;
196196
},
197197
},
198+
/**
199+
* Whether to hide the background of the headline section on mobile (e.g., in Borrower Profile Sidesheet)
200+
* */
201+
hideHeadlineBgOnMobile: {
202+
type: Boolean,
203+
default: false,
204+
},
198205
},
199206
emits: ['side-sheet-closed', 'go-to-link'],
200207
setup(props, { emit, slots }) {
@@ -203,6 +210,7 @@ export default {
203210
kvTrackFunction,
204211
trackEventCategory,
205212
widthDimensions,
213+
hideHeadlineBgOnMobile,
206214
} = toRefs(props);
207215
208216
const open = ref(false);
@@ -219,7 +227,9 @@ export default {
219227
});
220228
221229
const contentHeight = computed(() => {
222-
const height = windowHeight.value - heights.headline - heights.controls;
230+
const height = windowHeight.value
231+
- (hideHeadlineBgOnMobile.value ? 0 : heights.headline)
232+
- heights.controls;
223233
return Math.max(height, 0);
224234
});
225235

0 commit comments

Comments
 (0)