mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-12 05:27:56 +00:00
Fixed DropdownLabelsIntl layout
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
ce9a30a3ff
commit
7180c87aa8
@ -39,7 +39,7 @@
|
|||||||
export let shouldUpdateUndefined: boolean = true
|
export let shouldUpdateUndefined: boolean = true
|
||||||
export let minW0 = true
|
export let minW0 = true
|
||||||
|
|
||||||
let container: HTMLElement
|
let container: HTMLButtonElement
|
||||||
let opened: boolean = false
|
let opened: boolean = false
|
||||||
|
|
||||||
$: selectedItem = items.find((x) => x.id === selected)
|
$: selectedItem = items.find((x) => x.id === selected)
|
||||||
@ -75,28 +75,27 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={container} class:min-w-0={minW0}>
|
<Button
|
||||||
<Button
|
{icon}
|
||||||
{icon}
|
width={width ?? 'min-content'}
|
||||||
width={width ?? 'min-content'}
|
{size}
|
||||||
{size}
|
{kind}
|
||||||
{kind}
|
{disabled}
|
||||||
{disabled}
|
{justify}
|
||||||
{justify}
|
showTooltip={{ label, direction: labelDirection }}
|
||||||
showTooltip={{ label, direction: labelDirection }}
|
bind:input={container}
|
||||||
on:click={openPopup}
|
on:click={openPopup}
|
||||||
>
|
>
|
||||||
<span slot="content" class="overflow-label disabled flex-grow text-left mr-2">
|
<span slot="content" class="overflow-label disabled flex-grow text-left mr-2">
|
||||||
<Label
|
<Label
|
||||||
label={selectedItem ? selectedItem.label : label}
|
label={selectedItem ? selectedItem.label : label}
|
||||||
params={selectedItem ? selectedItem.params ?? params : params}
|
params={selectedItem ? selectedItem.params ?? params : params}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<svelte:fragment slot="iconRight">
|
<svelte:fragment slot="iconRight">
|
||||||
<DropdownIcon
|
<DropdownIcon
|
||||||
size={'small'}
|
size={'small'}
|
||||||
fill={kind === 'primary' && !disabled ? 'var(--primary-button-content-color)' : 'var(--theme-dark-color)'}
|
fill={kind === 'primary' && !disabled ? 'var(--primary-button-content-color)' : 'var(--theme-dark-color)'}
|
||||||
/>
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user