File tree 2 files changed +30
-11
lines changed
2 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import DataEncoderStatus from ' $lib/components/data-encoder-status.svelte' ;
5
5
import TimezoneSelect from ' $lib/components/timezone-select.svelte' ;
6
- import Button from ' $lib/holocene/button.svelte' ;
7
6
import Combobox from ' $lib/holocene/combobox/combobox.svelte' ;
8
7
import { translate } from ' $lib/i18n/translate' ;
9
8
import { lastUsedNamespace } from ' $lib/stores/namespaces' ;
48
47
on:change ={handleNamespaceSelect }
49
48
minSize ={32 }
50
49
actionTooltip ={translate (' namespaces.go-to-namespace' )}
51
- >
52
- <Button
53
- slot =" action"
54
- variant =" ghost"
55
- size =" xs"
56
- {href }
57
- disabled ={! namespaceExists }
58
- leadingIcon =" external-link"
59
- />
60
- </Combobox >
50
+ {href }
51
+ hrefDisabled ={! namespaceExists }
52
+ />
61
53
</div >
62
54
<div class =" flex items-center gap-2" >
63
55
<TimezoneSelect position ={screenWidth < 768 ? ' left' : ' right' } />
Original file line number Diff line number Diff line change 11
11
import Menu from ' $lib/holocene/menu/menu.svelte' ;
12
12
13
13
import Badge from ' ../badge.svelte' ;
14
+ import Button from ' ../button.svelte' ;
14
15
import Chip from ' ../chip.svelte' ;
15
16
import type { IconName } from ' ../icon' ;
16
17
import Icon from ' ../icon/icon.svelte' ;
45
46
error? : string ;
46
47
valid? : boolean ;
47
48
actionTooltip? : string ;
49
+ href? : string ;
50
+ hrefDisabled? : boolean ;
48
51
}
49
52
50
53
type MultiSelectProps = {
109
112
export let deselectAllLabel = ' Deselect All' ;
110
113
export let removeChipLabel = ' Remove Option' ;
111
114
export let actionTooltip = ' ' ;
115
+ export let href = ' ' ;
116
+ export let hrefDisabled = false ;
112
117
113
118
export let numberOfItemsSelectedLabel = (count : number ) =>
114
119
` ${count } option${count > 1 ? ' s' : ' ' } selected ` ;
402
407
<slot name =" action" />
403
408
{/if }
404
409
</div >
410
+ {:else if href }
411
+ <div class =" ml-1 flex h-full items-center border-l-2 border-subtle p-0.5" >
412
+ {#if actionTooltip }
413
+ <Tooltip text ={actionTooltip } right >
414
+ <Button
415
+ variant =" ghost"
416
+ size =" xs"
417
+ {href }
418
+ disabled ={hrefDisabled }
419
+ leadingIcon =" external-link"
420
+ />
421
+ </Tooltip >
422
+ {:else }
423
+ <Button
424
+ variant =" ghost"
425
+ size =" xs"
426
+ {href }
427
+ disabled ={hrefDisabled }
428
+ leadingIcon =" external-link"
429
+ />
430
+ {/if }
431
+ </div >
405
432
{/if }
406
433
</div >
407
434
You can’t perform that action at this time.
0 commit comments