diff --git a/src/Date/DatePickerInput.shared.tsx b/src/Date/DatePickerInput.shared.tsx index 76e06a9a..6b7f64da 100644 --- a/src/Date/DatePickerInput.shared.tsx +++ b/src/Date/DatePickerInput.shared.tsx @@ -14,6 +14,9 @@ export type DatePickerInputProps = { hasError?: boolean onValidationError?: ((error: string | null) => void) | undefined calendarIcon?: string + iconSize?: number + iconStyle?: React.CSSProperties + iconColor?: string saveLabel?: string saveLabelDisabled?: boolean uppercase?: boolean diff --git a/src/Date/DatePickerInput.tsx b/src/Date/DatePickerInput.tsx index e76c1bb9..e595a789 100644 --- a/src/Date/DatePickerInput.tsx +++ b/src/Date/DatePickerInput.tsx @@ -5,6 +5,8 @@ import DatePickerModal from './DatePickerModal' import { useLatest } from '../utils' import type { DatePickerInputProps } from './DatePickerInput.shared' import DatePickerInputWithoutModal from './DatePickerInputWithoutModal' +import { StyleProp } from 'react-native' +import { ViewStyle } from 'react-native' function DatePickerInput( { @@ -34,10 +36,12 @@ function DatePickerInput( inputButton={ withModal ? ( setVisible(true)} + style={rest.iconStyle as StyleProp} /> ) : null } diff --git a/src/__tests__/Date/__snapshots__/AnimatedCrossView.test.tsx.snap b/src/__tests__/Date/__snapshots__/AnimatedCrossView.test.tsx.snap index e9abd91c..fc97dc2d 100644 --- a/src/__tests__/Date/__snapshots__/AnimatedCrossView.test.tsx.snap +++ b/src/__tests__/Date/__snapshots__/AnimatedCrossView.test.tsx.snap @@ -4044,6 +4044,10 @@ exports[`renders collapsed AnimatedCrossView 1`] = ` { "margin": 0, }, + { + "paddingLeft": 16, + "paddingRight": 16, + }, { "height": 56, }, @@ -4058,8 +4062,6 @@ exports[`renders collapsed AnimatedCrossView 1`] = ` "fontWeight": undefined, "letterSpacing": 0.15, "lineHeight": undefined, - "paddingLeft": 16, - "paddingRight": 16, "textAlign": "left", "textAlignVertical": "center", }, diff --git a/src/__tests__/Date/__snapshots__/CalendarEdit.test.tsx.snap b/src/__tests__/Date/__snapshots__/CalendarEdit.test.tsx.snap index 7aeb9958..78f80ad9 100644 --- a/src/__tests__/Date/__snapshots__/CalendarEdit.test.tsx.snap +++ b/src/__tests__/Date/__snapshots__/CalendarEdit.test.tsx.snap @@ -196,6 +196,10 @@ exports[`renders CalendarEdit 1`] = ` { "margin": 0, }, + { + "paddingLeft": 16, + "paddingRight": 16, + }, { "height": 56, }, @@ -210,8 +214,6 @@ exports[`renders CalendarEdit 1`] = ` "fontWeight": undefined, "letterSpacing": 0.15, "lineHeight": undefined, - "paddingLeft": 16, - "paddingRight": 16, "textAlign": "left", "textAlignVertical": "center", }, diff --git a/src/__tests__/Date/__snapshots__/DatePickerInputWithoutModal.test.tsx.snap b/src/__tests__/Date/__snapshots__/DatePickerInputWithoutModal.test.tsx.snap index fac623b0..a1835f1e 100644 --- a/src/__tests__/Date/__snapshots__/DatePickerInputWithoutModal.test.tsx.snap +++ b/src/__tests__/Date/__snapshots__/DatePickerInputWithoutModal.test.tsx.snap @@ -188,6 +188,10 @@ exports[`renders DatePickerInput 1`] = ` { "margin": 0, }, + { + "paddingLeft": 16, + "paddingRight": 16, + }, { "height": 56, }, @@ -202,8 +206,6 @@ exports[`renders DatePickerInput 1`] = ` "fontWeight": undefined, "letterSpacing": 0.15, "lineHeight": undefined, - "paddingLeft": 16, - "paddingRight": 16, "textAlign": "left", "textAlignVertical": "center", },