Skip to content

Commit

Permalink
feat(client): responsive layout for components panel (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
JianJroh authored Mar 26, 2024
1 parent f7941e6 commit deb1788
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/client/src/pages/components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,16 @@ watchDebounced(filterName, (v) => {
}, { debounce: 300 })
const devtoolsState = useDevToolsState()
// responsive horizontal layout
const splitpanesRef = ref<HTMLDivElement>()
const { width: splitpanesWidth } = useElementSize(splitpanesRef)
const horizontal = computed(() => splitpanesWidth.value < 700)
</script>

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

0 comments on commit deb1788

Please sign in to comment.