Skip to content

Commit deb1788

Browse files
authoredMar 26, 2024··
feat(client): responsive layout for components panel (#293)
1 parent f7941e6 commit deb1788

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎packages/client/src/pages/components.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,16 @@ watchDebounced(filterName, (v) => {
259259
}, { debounce: 300 })
260260
261261
const devtoolsState = useDevToolsState()
262+
263+
// responsive horizontal layout
264+
const splitpanesRef = ref<HTMLDivElement>()
265+
const { width: splitpanesWidth } = useElementSize(splitpanesRef)
266+
const horizontal = computed(() => splitpanesWidth.value < 700)
262267
</script>
263268

264269
<template>
265270
<PanelGrids h-screen>
266-
<Splitpanes>
271+
<Splitpanes ref="splitpanesRef" :horizontal="horizontal">
267272
<Pane flex flex-col border="r base">
268273
<div w-full flex gap2 px2 py2>
269274
<VueInput v-if="loaded" v-model="filterName" :loading-debounce-time="250" :loading="!filtered" placeholder="Find components..." flex-1 />

0 commit comments

Comments
 (0)
Please sign in to comment.