mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-06 12:30:29 +08:00
Ensure show_label
param is used in HighlightedText (#10004)
* use show_label param * add changeset * add changeset * * remove empty label spacing * increase empty area --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
c3324d7f7f
commit
0879be78b3
6
.changeset/thick-teams-attend.md
Normal file
6
.changeset/thick-teams-attend.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/highlightedtext": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Ensure `show_label` param is used in HighlightedText
|
@ -36,6 +36,7 @@
|
||||
export let _selectable = false;
|
||||
export let combine_adjacent = false;
|
||||
export let interactive: boolean;
|
||||
export let show_label = true;
|
||||
|
||||
$: if (!color_map && Object.keys(color_map).length) {
|
||||
color_map = color_map;
|
||||
@ -73,12 +74,13 @@
|
||||
{...loading_status}
|
||||
on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
|
||||
/>
|
||||
{#if label}
|
||||
{#if label && show_label}
|
||||
<BlockLabel
|
||||
Icon={TextHighlight}
|
||||
{label}
|
||||
float={false}
|
||||
disable={container === false}
|
||||
{show_label}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@ -115,12 +117,13 @@
|
||||
i18n={gradio.i18n}
|
||||
on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
|
||||
/>
|
||||
{#if label}
|
||||
{#if label && show_label}
|
||||
<BlockLabel
|
||||
Icon={TextHighlight}
|
||||
{label}
|
||||
float={false}
|
||||
disable={container === false}
|
||||
{show_label}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@ -133,7 +136,7 @@
|
||||
{color_map}
|
||||
/>
|
||||
{:else}
|
||||
<Empty>
|
||||
<Empty size="small" unpadded_box={true}>
|
||||
<TextHighlight />
|
||||
</Empty>
|
||||
{/if}
|
||||
|
Loading…
x
Reference in New Issue
Block a user