Skip to content

DateTimePicker - adding 'headerStyle' prop #1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/components/dateTimePicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ class DateTimePicker extends Component {
/**
* Props to pass the Dialog component
*/
dialogProps: PropTypes.object
dialogProps: PropTypes.object,
/**
* style to apply to the iOS dialog header
*/
headerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number])
};

static defaultProps = {
Expand Down Expand Up @@ -202,10 +206,10 @@ class DateTimePicker extends Component {
};

renderHeader() {
const {useCustomTheme} = this.props;
const {useCustomTheme, headerStyle} = this.props;

return (
<View row spread bg-white paddingH-20 style={styles.header}>
<View row spread bg-white paddingH-20 style={[styles.header, headerStyle]}>
<Button
link
iconSource={Assets.icons.x}
Expand Down