budibase/packages/bbui/src/Table/SelectEditRenderer.svelte

29 lines
582 B
Svelte
Raw Normal View History

<script>
import Checkbox from "../Form/Checkbox.svelte"
import ActionButton from "../ActionButton/ActionButton.svelte"
export let selected
export let onEdit
export let allowSelectRows = false
export let allowEditRows = false
</script>
2022-02-24 10:12:45 +01:00
<div>
{#if allowSelectRows}
<Checkbox value={selected} />
{/if}
{#if allowEditRows}
<ActionButton size="S" on:click={onEdit}>Edit</ActionButton>
{/if}
</div>
<style>
div {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
gap: var(--spacing-m);
}
</style>