Skip to content

Commit e483926

Browse files
authored
DateTimePicker - adding 'headerStyle' prop to adjust iOS dialog header style (#1117)
1 parent 7438088 commit e483926

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/components/dateTimePicker/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ class DateTimePicker extends Component {
8989
/**
9090
* Props to pass the Dialog component
9191
*/
92-
dialogProps: PropTypes.object
92+
dialogProps: PropTypes.object,
93+
/**
94+
* style to apply to the iOS dialog header
95+
*/
96+
headerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number])
9397
};
9498

9599
static defaultProps = {
@@ -202,10 +206,10 @@ class DateTimePicker extends Component {
202206
};
203207

204208
renderHeader() {
205-
const {useCustomTheme} = this.props;
209+
const {useCustomTheme, headerStyle} = this.props;
206210

207211
return (
208-
<View row spread bg-white paddingH-20 style={styles.header}>
212+
<View row spread bg-white paddingH-20 style={[styles.header, headerStyle]}>
209213
<Button
210214
link
211215
iconSource={Assets.icons.x}

0 commit comments

Comments
 (0)