Skip to content

typescript - RadioGroup - support testID #1143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions generatedTypes/components/radioButton/RadioGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { PureComponent, GetDerivedStateFromProps } from 'react';
import { ViewProps } from 'react-native';
import { BaseComponentInjectedProps, ForwardRefInjectedProps } from '../../commons/new';
export declare type RadioGroupProps = {
export declare type RadioGroupProps = ViewProps & {
/**
* The initial value of the selected radio button
*/
Expand Down Expand Up @@ -31,7 +32,16 @@ declare class RadioGroup extends PureComponent<Props, RadioGroupState> {
render(): JSX.Element;
}
export { RadioGroup };
declare const _default: React.ComponentClass<RadioGroupProps & {
declare const _default: React.ComponentClass<ViewProps & {
/**
* The initial value of the selected radio button
*/
initialValue?: string | number | boolean | undefined;
/**
* Invoked once when value changes, by selecting one of the radio buttons in the group
*/
onValueChange?: ((value: string) => void) | ((value: number) => void) | ((value: boolean) => void) | undefined;
} & {
useCustomTheme?: boolean | undefined;
}, any>;
export default _default;
3 changes: 2 additions & 1 deletion src/components/radioButton/RadioGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash';
import React, {PureComponent, GetDerivedStateFromProps} from 'react';
import {ViewProps} from 'react-native';
import {
asBaseComponent,
forwardRef,
Expand All @@ -9,7 +10,7 @@ import {
import View from '../view';
import RadioGroupContext from './RadioGroupContext';

export type RadioGroupProps = {
export type RadioGroupProps = ViewProps & {
/**
* The initial value of the selected radio button
*/
Expand Down