Skip to content

Typescript/general missing typings #1389

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 2 commits into from
Jul 5, 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props extends DialogProps {
/**
* onSubmit callback for the picker dialog color change
*/
onSubmit?: () => void;
onSubmit?: (color: string, textColor: string) => void;
/**
* Props to pass the Dialog component // TODO: deprecate 'dialogProps' prop
*/
Expand Down
2 changes: 1 addition & 1 deletion generatedTypes/components/colorPicker/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface Props extends ColorPickerDialogProps {
* input: 'custom hex color code'
* }
*/
accessibilityLabels: {
accessibilityLabels?: {
addButton?: string;
dismissButton?: string;
doneButton?: string;
Expand Down
4 changes: 2 additions & 2 deletions generatedTypes/components/hint/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface HintProps {
interface HintState {
targetLayout?: HintTargetFrame;
targetLayoutInWindow?: HintTargetFrame;
animationEnded: boolean;
hintUnmounted: boolean;
}
/**
* @description: Hint component for displaying a tooltip over wrapped component
Expand All @@ -127,7 +127,7 @@ declare class Hint extends Component<HintProps, HintState> {
state: {
targetLayoutInWindow: undefined;
targetLayout: HintTargetFrame | undefined;
animationEnded: boolean;
hintUnmounted: boolean;
};
visibleAnimated: Animated.Value;
componentDidUpdate(prevProps: HintProps): void;
Expand Down
6 changes: 3 additions & 3 deletions generatedTypes/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export {default as TouchableOpacity, TouchableOpacityProps} from './components/t
export {default as Button, ButtonPropTypes, ButtonSize, ButtonProps} from './components/button';
export {default as Checkbox, CheckboxPropTypes, CheckboxProps} from './components/checkbox';
export {default as Chip, ChipPropTypes, ChipProps} from './components/chip';
export {default as ColorPicker, ColorPickerProps} from './components/colorPicker';
export {default as ColorPalette, ColorPaletteProps} from './components/colorPicker/ColorPalette';
export {default as ColorSwatch, ColorSwatchProps} from './components/colorPicker/ColorSwatch';
export {default as Drawer, DrawerProps, DrawerItemProps} from './components/drawer';
export {default as FeatureHighlight, FeatureHighlightProps} from './components/featureHighlight';
export {default as FloatingButton, FloatingButtonProps} from './components/floatingButton';
Expand Down Expand Up @@ -100,7 +103,6 @@ export {
StateScreen,
WheelPicker,
WheelPickerProps,
ColorPicker,
Picker,
PickerItemValue,
PickerProps
Expand All @@ -109,8 +111,6 @@ export {
/* All components that are missing either manual or auto generated typings */
export const AnimatedImage;
export const AnimatedScanner;
export const ColorPalette;
export const ColorSwatch;
export const DateTimePicker;
export const HighlighterOverlayView;
export const Keyboard;
Expand Down
2 changes: 1 addition & 1 deletion src/components/colorPicker/ColorPickerDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface Props extends DialogProps {
/**
* onSubmit callback for the picker dialog color change
*/
onSubmit?: () => void;
onSubmit?: (color: string, textColor: string) => void;
/**
* Props to pass the Dialog component // TODO: deprecate 'dialogProps' prop
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/colorPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface Props extends ColorPickerDialogProps {
* input: 'custom hex color code'
* }
*/
accessibilityLabels: {
accessibilityLabels?: {
addButton?: string,
dismissButton?: string,
doneButton?: string,
Expand Down