Skip to content

Commit f26f754

Browse files
committed
Updated snapshots
1 parent 44984b3 commit f26f754

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

src/Date/DatePickerInput.shared.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/Date/DatePickerInput.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import DatePickerModal from './DatePickerModal'
55
import { useLatest } from '../utils'
66
import type { DatePickerInputProps } from './DatePickerInput.shared'
77
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
8+
import { StyleProp } from 'react-native'
9+
import { ViewStyle } from 'react-native'
810

911
function 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
}

src/__tests__/Date/__snapshots__/AnimatedCrossView.test.tsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
},

src/__tests__/Date/__snapshots__/CalendarEdit.test.tsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
},

src/__tests__/Date/__snapshots__/DatePickerInputWithoutModal.test.tsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)