app-platform: remove unsupported saleor release surface
This commit is contained in:
@@ -4,7 +4,8 @@ export function useCollapsingHeaderTabs(
|
||||
headerRef: Ref<HTMLElement | null>,
|
||||
primaryRef: Ref<HTMLElement | null>,
|
||||
tabsProbeRef: Ref<HTMLElement | null>,
|
||||
minSearchWidth = 176
|
||||
minSearchWidth = 176,
|
||||
minTabsWidth = 260
|
||||
) {
|
||||
const collapsed = ref(false)
|
||||
let resizeObserver: ResizeObserver | null = null
|
||||
@@ -17,7 +18,9 @@ export function useCollapsingHeaderTabs(
|
||||
const primaryWidth = primaryRef.value?.getBoundingClientRect().width ?? 0
|
||||
const tabsWidth = probe.getBoundingClientRect().width
|
||||
const gapWidth = 48
|
||||
collapsed.value = primaryWidth + tabsWidth + minSearchWidth + gapWidth > header.clientWidth
|
||||
const fullTabsFit = primaryWidth + tabsWidth + minSearchWidth + gapWidth <= header.clientWidth
|
||||
const usableTabsFit = primaryWidth + minTabsWidth + minSearchWidth + gapWidth <= header.clientWidth
|
||||
collapsed.value = !fullTabsFit && !usableTabsFit
|
||||
}
|
||||
|
||||
function scheduleMeasure() {
|
||||
|
||||
Reference in New Issue
Block a user