1
0
Fork 0
mirror of synced 2024-08-06 05:38:40 +12:00

Update form step control to render tooltips above rather than below buttons

This commit is contained in:
Andrew Kingston 2024-05-02 11:37:58 +01:00
parent a8b74f5f8c
commit b374e6bdc9

View file

@ -1,6 +1,6 @@
<script> <script>
import { createEventDispatcher, getContext } from "svelte" import { createEventDispatcher, getContext } from "svelte"
import { ActionButton } from "@budibase/bbui" import { ActionButton, AbsTooltip } from "@budibase/bbui"
const multiStepStore = getContext("multi-step-form-block") const multiStepStore = getContext("multi-step-form-block")
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
@ -28,6 +28,7 @@
</div> </div>
{:else} {:else}
<div class="step-actions"> <div class="step-actions">
<AbsTooltip text="Previous step" noWrap>
<ActionButton <ActionButton
size="S" size="S"
secondary secondary
@ -36,8 +37,9 @@
on:click={() => { on:click={() => {
stepAction("previousStep") stepAction("previousStep")
}} }}
tooltip={"Previous step"}
/> />
</AbsTooltip>
<AbsTooltip text="Next step" noWrap>
<ActionButton <ActionButton
size="S" size="S"
secondary secondary
@ -46,8 +48,9 @@
on:click={() => { on:click={() => {
stepAction("nextStep") stepAction("nextStep")
}} }}
tooltip={"Next step"}
/> />
</AbsTooltip>
<AbsTooltip text="Remove step" noWrap>
<ActionButton <ActionButton
size="S" size="S"
secondary secondary
@ -56,8 +59,9 @@
on:click={() => { on:click={() => {
stepAction("removeStep") stepAction("removeStep")
}} }}
tooltip={"Remove step"}
/> />
</AbsTooltip>
<AbsTooltip text="Add step" noWrap>
<ActionButton <ActionButton
size="S" size="S"
secondary secondary
@ -65,8 +69,8 @@
on:click={() => { on:click={() => {
stepAction("addStep") stepAction("addStep")
}} }}
tooltip={"Add step"}
/> />
</AbsTooltip>
</div> </div>
{/if} {/if}