fix(radio-button): allow value type to be a number (#1868)

This commit is contained in:
metonym 2023-12-17 09:42:28 -08:00 committed by GitHub
commit 479225711a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 18 deletions

View file

@ -8,7 +8,7 @@ export interface RadioButtonProps extends RestProps {
* Specify the value of the radio button
* @default ""
*/
value?: string;
value?: string | number;
/**
* Set to `true` to check the radio button

View file

@ -8,7 +8,7 @@ export interface RadioButtonGroupProps extends RestProps {
* Set the selected radio button value
* @default undefined
*/
selected?: string;
selected?: string | number;
/**
* Set to `true` to disable the radio buttons
@ -64,7 +64,7 @@ export interface RadioButtonGroupProps extends RestProps {
export default class RadioButtonGroup extends SvelteComponentTyped<
RadioButtonGroupProps,
{
change: CustomEvent<string>;
change: CustomEvent<string | number>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];