mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-25 02:26:14 +03:00
Modified buttons for full-width which was not update in the button-component
This commit is contained in:
parent
541a72de0c
commit
e5e47bf64a
@ -6,7 +6,7 @@
|
||||
import Button from './Button.svelte';
|
||||
|
||||
const heights = ['basic', 'small'] as const;
|
||||
const widths = ['basic', 'long'] as const;
|
||||
const widths = ['basic', 'full-width'] as const;
|
||||
|
||||
const content = [
|
||||
[IconHome, 'Label'],
|
||||
|
@ -16,7 +16,7 @@
|
||||
<ButtonGroup
|
||||
leftLabel="Cancel"
|
||||
rightLabel="Submit"
|
||||
width="long"
|
||||
width="full-width"
|
||||
leftAction={noop}
|
||||
rightAction={noop}
|
||||
/>
|
||||
@ -37,7 +37,7 @@
|
||||
leftLabel="Cancel"
|
||||
rightLabel="Submit"
|
||||
middleLabel="Middle"
|
||||
width="long"
|
||||
width="full-width"
|
||||
leftAction={noop}
|
||||
rightAction={noop}
|
||||
/>
|
||||
|
@ -7,7 +7,7 @@
|
||||
export let rightAction: () => void;
|
||||
export let middleLabel: string | undefined = undefined;
|
||||
export let middleAction: (() => void) | undefined = undefined;
|
||||
export let width: 'basic' | 'long' = 'basic';
|
||||
export let width: 'basic' | 'full-width' = 'basic';
|
||||
</script>
|
||||
|
||||
{#if !middleLabel}
|
||||
@ -22,13 +22,13 @@
|
||||
{:else}
|
||||
<div class="btn-group btn-group--segmented">
|
||||
<button class="joined-base rounded-l-lg border-l border-t border-b" on:click={leftAction}>
|
||||
<span class="my-2 {width === 'long' ? 'mx-[31.5px]' : 'mx-[16px]'}">{leftLabel}</span>
|
||||
<span class="my-2 {width === 'full-width' ? 'mx-[31.5px]' : 'mx-[16px]'}">{leftLabel}</span>
|
||||
</button>
|
||||
<button class="joined-base border" on:click={middleAction}>
|
||||
<span class="my-2 {width === 'long' ? 'mx-[31.5px]' : 'mx-[16px]'}">{middleLabel}</span>
|
||||
<span class="my-2 {width === 'full-width' ? 'mx-[31.5px]' : 'mx-[16px]'}">{middleLabel}</span>
|
||||
</button>
|
||||
<button class="joined-base rounded-r-lg border-r border-t border-b" on:click={rightAction}>
|
||||
<span class="my-2 {width === 'long' ? 'mx-[31.5px]' : 'mx-[16px]'}">{rightLabel}</span>
|
||||
<span class="my-2 {width === 'full-width' ? 'mx-[31.5px]' : 'mx-[16px]'}">{rightLabel}</span>
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user