File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed
__tests__/Date/__snapshots__ Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ export type DatePickerInputProps = {
1414 hasError ?: boolean
1515 onValidationError ?: ( ( error : string | null ) => void ) | undefined
1616 calendarIcon ?: string
17+ iconSize ?: number
18+ iconStyle ?: React . CSSProperties
19+ iconColor ?: string
1720 saveLabel ?: string
1821 saveLabelDisabled ?: boolean
1922 uppercase ?: boolean
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import DatePickerModal from './DatePickerModal'
55import { useLatest } from '../utils'
66import type { DatePickerInputProps } from './DatePickerInput.shared'
77import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
8+ import { StyleProp } from 'react-native'
9+ import { ViewStyle } from 'react-native'
810
911function DatePickerInput (
1012 {
@@ -34,10 +36,12 @@ function DatePickerInput(
3436 inputButton = {
3537 withModal ? (
3638 < TextInput . Icon
37- size = { 24 }
39+ size = { rest . iconSize ?? 24 }
3840 icon = { calendarIcon }
41+ color = { rest . iconColor ?? undefined }
3942 disabled = { rest . disabled }
4043 onPress = { ( ) => setVisible ( true ) }
44+ style = { rest . iconStyle as StyleProp < ViewStyle > }
4145 />
4246 ) : null
4347 }
Original file line number Diff line number Diff line change @@ -4044,6 +4044,10 @@ exports[`renders collapsed AnimatedCrossView 1`] = `
40444044 {
40454045 " margin" : 0 ,
40464046 },
4047+ {
4048+ " paddingLeft" : 16 ,
4049+ " paddingRight" : 16 ,
4050+ },
40474051 {
40484052 " height" : 56 ,
40494053 },
@@ -4058,8 +4062,6 @@ exports[`renders collapsed AnimatedCrossView 1`] = `
40584062 " fontWeight" : undefined ,
40594063 " letterSpacing" : 0.15 ,
40604064 " lineHeight" : undefined ,
4061- " paddingLeft" : 16 ,
4062- " paddingRight" : 16 ,
40634065 " textAlign" : " left" ,
40644066 " textAlignVertical" : " center" ,
40654067 },
Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ exports[`renders CalendarEdit 1`] = `
196196 {
197197 " margin" : 0 ,
198198 },
199+ {
200+ " paddingLeft" : 16 ,
201+ " paddingRight" : 16 ,
202+ },
199203 {
200204 " height" : 56 ,
201205 },
@@ -210,8 +214,6 @@ exports[`renders CalendarEdit 1`] = `
210214 " fontWeight" : undefined ,
211215 " letterSpacing" : 0.15 ,
212216 " lineHeight" : undefined ,
213- " paddingLeft" : 16 ,
214- " paddingRight" : 16 ,
215217 " textAlign" : " left" ,
216218 " textAlignVertical" : " center" ,
217219 },
Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ exports[`renders DatePickerInput 1`] = `
188188 {
189189 " margin" : 0 ,
190190 },
191+ {
192+ " paddingLeft" : 16 ,
193+ " paddingRight" : 16 ,
194+ },
191195 {
192196 " height" : 56 ,
193197 },
@@ -202,8 +206,6 @@ exports[`renders DatePickerInput 1`] = `
202206 " fontWeight" : undefined ,
203207 " letterSpacing" : 0.15 ,
204208 " lineHeight" : undefined ,
205- " paddingLeft" : 16 ,
206- " paddingRight" : 16 ,
207209 " textAlign" : " left" ,
208210 " textAlignVertical" : " center" ,
209211 },
You can’t perform that action at this time.
0 commit comments