Merge pull request #2715 from gitbutlerapp/Fix-generate-commit-dropdown-styles

Fix: outdated checkbox design removed from `ContextMenuItem`
This commit is contained in:
Pavel Laptev 2024-02-15 14:33:21 +01:00 committed by GitHub
commit 66a1a17747
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts">
import Button from '$lib/components/Button.svelte';
import Checkbox from '$lib/components/Checkbox.svelte';
import DropDownButton from '$lib/components/DropDownButton.svelte';
import ContextMenu from '$lib/components/contextmenu/ContextMenu.svelte';
import ContextMenuItem from '$lib/components/contextmenu/ContextMenuItem.svelte';
@ -157,15 +158,18 @@
<ContextMenu type="checklist" slot="context-menu" bind:this={contextMenu}>
<ContextMenuSection>
<ContextMenuItem
checked={$commitGenerationExtraConcise}
label="Extra concise"
on:click={() => ($commitGenerationExtraConcise = !$commitGenerationExtraConcise)}
/>
>
<Checkbox small slot="control" bind:checked={$commitGenerationExtraConcise} />
</ContextMenuItem>
<ContextMenuItem
checked={$commitGenerationUseEmojis}
label="Use emojis 😎"
on:click={() => ($commitGenerationUseEmojis = !$commitGenerationUseEmojis)}
/>
>
<Checkbox small slot="control" bind:checked={$commitGenerationUseEmojis} />
</ContextMenuItem>
</ContextMenuSection>
</ContextMenu>
</DropDownButton>

View File

@ -5,7 +5,6 @@
import type { ContextMenuContext } from './contextMenu';
export let icon: keyof typeof iconsJson | undefined = undefined;
export let checked = false;
export let id: string | undefined = undefined;
export let label: string;
export let selected = false;
@ -31,13 +30,6 @@
{#if icon}
<Icon name={icon} />
{/if}
{#if context.type == 'checklist'}
{#if checked}
<Icon name="tick-small" />
{:else}
<Icon name="empty-checkbox-small" opacity={0.2} />
{/if}
{/if}
<div class="label text-base-12">
{label}
@ -54,7 +46,7 @@
height: var(--space-24);
padding: var(--space-4) var(--space-6);
border-radius: var(--radius-s);
gap: var(--space-8);
gap: var(--space-12);
&:not(.disabled):hover {
background: var(--clr-theme-container-sub);
}