Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
1.1 KiB

<script>
import GenericBindingPopover from "./GenericBindingPopover.svelte"
import { Input, Icon } from "@budibase/bbui"
export let bindings = []
export let value
let anchor
let popover = undefined
let enrichedValue
let inputProps
// Extract all other props to pass to input component
$: {
let { bindings, ...otherProps } = $$props
inputProps = otherProps
}
</script>
<div class="container" bind:this={anchor}>
<Input {...inputProps} bind:value />
<button on:click={popover.show}>
<Icon name="edit" />
</button>
</div>
<GenericBindingPopover
{anchor}
{bindings}
bind:value
bind:popover
align="right" />
<style>
.container {
position: relative;
}
button {
position: absolute;
background: none;
border: none;
border-radius: 50%;
height: 24px;
width: 24px;
background: var(--grey-4);
right: var(--spacing-s);
bottom: 9px;
}
button:hover {
background: var(--grey-5);
cursor: pointer;
}
button :global(svg) {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%) !important;
}
</style>