Skip to content

Commit

Permalink
fix: Update incorrect SwitchChangeEvent type
Browse files Browse the repository at this point in the history
  • Loading branch information
retyui committed Oct 10, 2022
1 parent e4dff28 commit a868181
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Libraries/Components/Switch/Switch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes';
import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet';
import {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
import {ViewProps} from '../View/ViewPropTypes';
import {NativeSyntheticEvent, TargetedEvent} from '../../Types/CoreEventTypes';

export interface SwitchPropsIOS extends ViewProps {
/**
Expand All @@ -37,10 +38,12 @@ export interface SwitchPropsIOS extends ViewProps {
tintColor?: ColorValue | undefined;
}

export interface SwitchChangeEvent extends React.SyntheticEvent {
export interface SwitchChangeEventData extends TargetedEvent {
value: boolean;
}

export interface SwitchChangeEvent extends NativeSyntheticEvent<SwitchChangeEventData> { }

export interface SwitchProps extends SwitchPropsIOS {
/**
* Color of the foreground switch grip.
Expand Down

0 comments on commit a868181

Please sign in to comment.