File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import Calendar, {
1111} from './Calendar'
1212
1313import AnimatedCrossView from './AnimatedCrossView'
14- import { useTheme } from 'react-native-paper'
1514import DatePickerModalHeader from './DatePickerModalHeader'
1615import DatePickerModalContentHeader , {
1716 HeaderPickProps ,
@@ -86,7 +85,6 @@ export function DatePickerModalContent(
8685 startYear,
8786 endYear,
8887 } = props
89- const theme = useTheme ( )
9088 const anyProps = props as any
9189
9290 // use local state to add only onConfirm state changes
@@ -164,10 +162,8 @@ export function DatePickerModalContent(
164162 endLabel = { props . endLabel }
165163 uppercase = { props . uppercase ?? true }
166164 locale = { locale }
167- editIcon = { props ?. editIcon ?? theme . isV3 ? 'pencil-outline' : 'pencil' }
168- calendarIcon = {
169- props . calendarIcon ?? theme . isV3 ? 'calendar-blank' : 'calendar'
170- }
165+ editIcon = { props ?. editIcon }
166+ calendarIcon = { props . calendarIcon }
171167 />
172168 </ DatePickerModalHeaderBackground >
173169 < AnimatedCrossView
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ export interface HeaderPickProps {
1616 headerSeparator ?: string
1717 startLabel ?: string
1818 endLabel ?: string
19- editIcon : string
20- calendarIcon : string
19+ editIcon ? : string
20+ calendarIcon ? : string
2121 closeIcon ?: string
2222}
2323
@@ -99,7 +99,15 @@ export default function DatePickerModalContentHeader(
9999 < View style = { styles . fill } />
100100 { allowEditing ? (
101101 < IconButton
102- icon = { collapsed ? editIcon : calendarIcon }
102+ icon = {
103+ collapsed
104+ ? editIcon ?? theme . isV3
105+ ? 'pencil-outline'
106+ : 'pencil'
107+ : calendarIcon ?? theme . isV3
108+ ? 'calendar-blank'
109+ : 'calendar'
110+ }
103111 accessibilityLabel = {
104112 collapsed
105113 ? getTranslation ( props . locale , 'typeInDate' )
You can’t perform that action at this time.
0 commit comments