mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-29 14:50:34 +08:00
Implement issue state change button
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<script lang="ts">
|
||||
export let selected: boolean;
|
||||
export let disabled: boolean = false;
|
||||
export let title: string | undefined = undefined;
|
||||
export let style: string | undefined = undefined;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: 0.375rem;
|
||||
padding: 0.5rem 0.375rem;
|
||||
white-space: nowrap;
|
||||
font-size: var(--font-size-small);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--color-foreground-contrast);
|
||||
clip-path: var(--1px-corner-fill);
|
||||
}
|
||||
.item.disabled {
|
||||
color: var(--color-foreground-disabled);
|
||||
}
|
||||
.item:hover,
|
||||
.selected {
|
||||
background-color: var(--color-fill-ghost);
|
||||
}
|
||||
.selected {
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-foreground-contrast);
|
||||
background-color: var(--color-fill-ghost);
|
||||
}
|
||||
.item:hover.selected {
|
||||
background-color: var(--color-fill-ghost-hover);
|
||||
}
|
||||
.item:hover.selected.disabled {
|
||||
background-color: var(--color-fill-ghost);
|
||||
}
|
||||
.item:hover.disabled {
|
||||
cursor: not-allowed;
|
||||
background-color: var(--color-background-float);
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="item"
|
||||
class:selected
|
||||
class:disabled
|
||||
{style}
|
||||
{title}
|
||||
on:click>
|
||||
<slot />
|
||||
</div>
|
||||
Reference in New Issue
Block a user