@types/react-radio-group
TypeScript icon, indicating that this package has built-in type declarations

3.0.7 • Public • Published

Installation

npm install --save @types/react-radio-group

Summary

This package contains type definitions for react-radio-group (https://github.com/chenglou/react-radio-group).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-radio-group.

index.d.ts

import * as React from "react";

// Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
export type Omit<T, K extends keyof T> = Pick<
    T,
    ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never; [x: number]: never })[keyof T]
>;

export namespace Radio {
    type RadioProps =
        & Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "name" | "role" | "type" | "aria-checked">
        & {
            value: any;
        };
}
export const Radio: React.ComponentClass<Radio.RadioProps>;

export namespace RadioGroup {
    type RadioGroupProps = Omit<React.HTMLProps<any>, "onChange"> & {
        selectedValue?: any;
        onChange?: ((value: any) => void) | undefined;
        Component?: React.ElementType<Omit<React.HTMLProps<any>, "onChange" | "role">> | undefined;
    };
}
export const RadioGroup: React.ComponentClass<RadioGroup.RadioGroupProps>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Jason Unger.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-radio-group

Weekly Downloads

9,508

Version

3.0.7

License

MIT

Unpacked Size

4.54 kB

Total Files

5

Last publish

Collaborators

  • types