gradio-pr-bot commited on
Commit
c1589b4
·
verified ·
1 Parent(s): 9f71cb3

Upload folder using huggingface_hub

Browse files
6.2.0/label/Index.svelte CHANGED
@@ -7,7 +7,7 @@
7
  import { Gradio } from "@gradio/utils";
8
  import Label from "./shared/Label.svelte";
9
  import { LineChart as LabelIcon } from "@gradio/icons";
10
- import { Block, BlockLabel, Empty } from "@gradio/atoms";
11
  import { StatusTracker } from "@gradio/statustracker";
12
 
13
  const props = $props();
@@ -41,6 +41,14 @@
41
  on_clear_status={() =>
42
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
43
  />
 
 
 
 
 
 
 
 
44
  {#if gradio.shared.show_label}
45
  <BlockLabel
46
  Icon={LabelIcon}
 
7
  import { Gradio } from "@gradio/utils";
8
  import Label from "./shared/Label.svelte";
9
  import { LineChart as LabelIcon } from "@gradio/icons";
10
+ import { Block, BlockLabel, Empty, IconButtonWrapper } from "@gradio/atoms";
11
  import { StatusTracker } from "@gradio/statustracker";
12
 
13
  const props = $props();
 
41
  on_clear_status={() =>
42
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
43
  />
44
+ {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
45
+ <IconButtonWrapper
46
+ buttons={gradio.props.buttons}
47
+ on_custom_button_click={(id) => {
48
+ gradio.dispatch("custom_button_click", { id });
49
+ }}
50
+ />
51
+ {/if}
52
  {#if gradio.shared.show_label}
53
  <BlockLabel
54
  Icon={LabelIcon}
6.2.0/label/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/label",
3
- "version": "0.5.22",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/label",
3
+ "version": "0.6.0",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.2.0/label/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SelectData, LoadingStatus } from "@gradio/utils";
2
 
3
  export interface LabelProps {
4
  value: {
@@ -8,10 +8,12 @@ export interface LabelProps {
8
  color: undefined | string;
9
  _selectable: boolean;
10
  show_heading: boolean;
 
11
  }
12
 
13
  export interface LabelEvents {
14
  change: never;
15
  select: SelectData;
16
  clear_status: LoadingStatus;
 
17
  }
 
1
+ import type { SelectData, LoadingStatus, CustomButton } from "@gradio/utils";
2
 
3
  export interface LabelProps {
4
  value: {
 
8
  color: undefined | string;
9
  _selectable: boolean;
10
  show_heading: boolean;
11
+ buttons: (string | CustomButton)[] | null;
12
  }
13
 
14
  export interface LabelEvents {
15
  change: never;
16
  select: SelectData;
17
  clear_status: LoadingStatus;
18
+ custom_button_click: { id: number };
19
  }