gradio-pr-bot commited on
Commit
8c2e2c3
·
verified ·
1 Parent(s): 9e03e6a

Upload folder using huggingface_hub

Browse files
6.2.0/radio/Index.svelte CHANGED
@@ -5,7 +5,7 @@
5
 
6
  <script lang="ts">
7
  import { Gradio } from "@gradio/utils";
8
- import { Block, BlockTitle } from "@gradio/atoms";
9
  import { StatusTracker } from "@gradio/statustracker";
10
  import BaseRadio from "./shared/Radio.svelte";
11
  import type { RadioEvents, RadioProps } from "./types";
@@ -42,6 +42,14 @@
42
  on_clear_status={() =>
43
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
44
  />
 
 
 
 
 
 
 
 
45
 
46
  <BlockTitle show_label={gradio.shared.show_label} info={gradio.props.info}
47
  >{gradio.shared.label || gradio.i18n("radio.radio")}</BlockTitle
 
5
 
6
  <script lang="ts">
7
  import { Gradio } from "@gradio/utils";
8
+ import { Block, BlockTitle, IconButtonWrapper } from "@gradio/atoms";
9
  import { StatusTracker } from "@gradio/statustracker";
10
  import BaseRadio from "./shared/Radio.svelte";
11
  import type { RadioEvents, RadioProps } from "./types";
 
42
  on_clear_status={() =>
43
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
44
  />
45
+ {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
46
+ <IconButtonWrapper
47
+ buttons={gradio.props.buttons}
48
+ on_custom_button_click={(id) => {
49
+ gradio.dispatch("custom_button_click", { id });
50
+ }}
51
+ />
52
+ {/if}
53
 
54
  <BlockTitle show_label={gradio.shared.show_label} info={gradio.props.info}
55
  >{gradio.shared.label || gradio.i18n("radio.radio")}</BlockTitle
6.2.0/radio/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/radio",
3
- "version": "0.8.0",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/radio",
3
+ "version": "0.9.0",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.2.0/radio/types.ts CHANGED
@@ -1,11 +1,12 @@
1
  import type { LoadingStatus } from "@gradio/statustracker";
2
- import type { SelectData } from "@gradio/utils";
3
 
4
  export interface RadioProps {
5
  choices: [string, string | number][];
6
  value: string;
7
  info: string;
8
  rtl: boolean;
 
9
  }
10
 
11
  export interface RadioEvents {
@@ -13,4 +14,5 @@ export interface RadioEvents {
13
  change: any;
14
  input: any;
15
  clear_status: LoadingStatus;
 
16
  }
 
1
  import type { LoadingStatus } from "@gradio/statustracker";
2
+ import type { SelectData, CustomButton } from "@gradio/utils";
3
 
4
  export interface RadioProps {
5
  choices: [string, string | number][];
6
  value: string;
7
  info: string;
8
  rtl: boolean;
9
+ buttons: (string | CustomButton)[] | null;
10
  }
11
 
12
  export interface RadioEvents {
 
14
  change: any;
15
  input: any;
16
  clear_status: LoadingStatus;
17
+ custom_button_click: { id: number };
18
  }