fix: DefaultTargetButton size for the stacking feature

This commit is contained in:
Pavel Laptev 2024-10-04 10:56:48 +02:00
parent a2d2ebdf07
commit 210b58d8f8
3 changed files with 6 additions and 3 deletions

View File

@ -151,6 +151,7 @@
<div class="header__actions"> <div class="header__actions">
<div class="header__buttons"> <div class="header__buttons">
<DefaultTargetButton <DefaultTargetButton
size="button"
selectedForChanges={branch.selectedForChanges} selectedForChanges={branch.selectedForChanges}
onclick={async () => { onclick={async () => {
isTargetBranchAnimated = true; isTargetBranchAnimated = true;

View File

@ -4,9 +4,10 @@
interface Props { interface Props {
selectedForChanges: boolean; selectedForChanges: boolean;
onclick: () => void; onclick: () => void;
size: 'button' | 'tag';
} }
const { selectedForChanges, onclick }: Props = $props(); const { selectedForChanges, size = 'button', onclick }: Props = $props();
</script> </script>
{#if selectedForChanges} {#if selectedForChanges}
@ -15,7 +16,7 @@
kind="soft" kind="soft"
tooltip="New changes will land here" tooltip="New changes will land here"
icon="target" icon="target"
size="tag" {size}
clickable={false} clickable={false}
> >
Default branch Default branch
@ -26,7 +27,7 @@
outline outline
tooltip="When selected, new changes land here" tooltip="When selected, new changes land here"
icon="target" icon="target"
size="tag" {size}
{onclick} {onclick}
> >
Set as default Set as default

View File

@ -112,6 +112,7 @@
<BranchLabel name={branch.name} onChange={(name) => handleBranchNameChange(name)} /> <BranchLabel name={branch.name} onChange={(name) => handleBranchNameChange(name)} />
<span class="button-group"> <span class="button-group">
<DefaultTargetButton <DefaultTargetButton
size="tag"
selectedForChanges={branch.selectedForChanges} selectedForChanges={branch.selectedForChanges}
onclick={async () => { onclick={async () => {
isTargetBranchAnimated = true; isTargetBranchAnimated = true;