Skip to content

Commit 0560cf8

Browse files
authored
Typescript/general missing typings (#1389)
* ColorPicker components typings * Missed Hint type change
1 parent f2c4339 commit 0560cf8

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

generatedTypes/components/colorPicker/ColorPickerDialog.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface Props extends DialogProps {
99
/**
1010
* onSubmit callback for the picker dialog color change
1111
*/
12-
onSubmit?: () => void;
12+
onSubmit?: (color: string, textColor: string) => void;
1313
/**
1414
* Props to pass the Dialog component // TODO: deprecate 'dialogProps' prop
1515
*/

generatedTypes/components/colorPicker/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface Props extends ColorPickerDialogProps {
2727
* input: 'custom hex color code'
2828
* }
2929
*/
30-
accessibilityLabels: {
30+
accessibilityLabels?: {
3131
addButton?: string;
3232
dismissButton?: string;
3333
doneButton?: string;

generatedTypes/components/hint/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export interface HintProps {
107107
interface HintState {
108108
targetLayout?: HintTargetFrame;
109109
targetLayoutInWindow?: HintTargetFrame;
110-
animationEnded: boolean;
110+
hintUnmounted: boolean;
111111
}
112112
/**
113113
* @description: Hint component for displaying a tooltip over wrapped component
@@ -127,7 +127,7 @@ declare class Hint extends Component<HintProps, HintState> {
127127
state: {
128128
targetLayoutInWindow: undefined;
129129
targetLayout: HintTargetFrame | undefined;
130-
animationEnded: boolean;
130+
hintUnmounted: boolean;
131131
};
132132
visibleAnimated: Animated.Value;
133133
componentDidUpdate(prevProps: HintProps): void;

generatedTypes/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export {default as TouchableOpacity, TouchableOpacityProps} from './components/t
3434
export {default as Button, ButtonPropTypes, ButtonSize, ButtonProps} from './components/button';
3535
export {default as Checkbox, CheckboxPropTypes, CheckboxProps} from './components/checkbox';
3636
export {default as Chip, ChipPropTypes, ChipProps} from './components/chip';
37+
export {default as ColorPicker, ColorPickerProps} from './components/colorPicker';
38+
export {default as ColorPalette, ColorPaletteProps} from './components/colorPicker/ColorPalette';
39+
export {default as ColorSwatch, ColorSwatchProps} from './components/colorPicker/ColorSwatch';
3740
export {default as Drawer, DrawerProps, DrawerItemProps} from './components/drawer';
3841
export {default as FeatureHighlight, FeatureHighlightProps} from './components/featureHighlight';
3942
export {default as FloatingButton, FloatingButtonProps} from './components/floatingButton';
@@ -100,7 +103,6 @@ export {
100103
StateScreen,
101104
WheelPicker,
102105
WheelPickerProps,
103-
ColorPicker,
104106
Picker,
105107
PickerItemValue,
106108
PickerProps
@@ -109,8 +111,6 @@ export {
109111
/* All components that are missing either manual or auto generated typings */
110112
export const AnimatedImage;
111113
export const AnimatedScanner;
112-
export const ColorPalette;
113-
export const ColorSwatch;
114114
export const DateTimePicker;
115115
export const HighlighterOverlayView;
116116
export const Keyboard;

src/components/colorPicker/ColorPickerDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface Props extends DialogProps {
3232
/**
3333
* onSubmit callback for the picker dialog color change
3434
*/
35-
onSubmit?: () => void;
35+
onSubmit?: (color: string, textColor: string) => void;
3636
/**
3737
* Props to pass the Dialog component // TODO: deprecate 'dialogProps' prop
3838
*/

src/components/colorPicker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface Props extends ColorPickerDialogProps {
3737
* input: 'custom hex color code'
3838
* }
3939
*/
40-
accessibilityLabels: {
40+
accessibilityLabels?: {
4141
addButton?: string,
4242
dismissButton?: string,
4343
doneButton?: string,

0 commit comments

Comments
 (0)