Update size button to be a detail popover
This commit is contained in:
parent
4979cce132
commit
83eed815c3
|
@ -1,6 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
import { ActionButton, Popover, Label } from "@budibase/bbui"
|
import { ActionButton, Label } from "@budibase/bbui"
|
||||||
|
import DetailPopover from "components/common/DetailPopover.svelte"
|
||||||
|
|
||||||
const {
|
const {
|
||||||
Constants,
|
Constants,
|
||||||
|
@ -32,8 +33,7 @@
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
let open = false
|
let popover
|
||||||
let anchor
|
|
||||||
|
|
||||||
// Column width sizes
|
// Column width sizes
|
||||||
$: allSmall = $columns.every(col => col.width === smallColSize)
|
$: allSmall = $columns.every(col => col.width === smallColSize)
|
||||||
|
@ -66,21 +66,19 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={anchor}>
|
<DetailPopover bind:this={popover} title="Column and row size">
|
||||||
|
<svelte:fragment slot="anchor" let:open>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon="MoveUpDown"
|
icon="MoveUpDown"
|
||||||
quiet
|
quiet
|
||||||
size="M"
|
size="M"
|
||||||
on:click={() => (open = !open)}
|
on:click={popover?.open}
|
||||||
selected={open}
|
selected={open}
|
||||||
disabled={!$columns.length}
|
disabled={!$columns.length}
|
||||||
>
|
>
|
||||||
Size
|
Size
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</div>
|
</svelte:fragment>
|
||||||
|
|
||||||
<Popover bind:open {anchor} align="left">
|
|
||||||
<div class="content">
|
|
||||||
<div class="size">
|
<div class="size">
|
||||||
<Label>Row height</Label>
|
<Label>Row height</Label>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
|
@ -113,8 +111,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</DetailPopover>
|
||||||
</Popover>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.content {
|
.content {
|
||||||
|
|
Loading…
Reference in New Issue