-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathInboxCallButton.js
41 lines (36 loc) · 1.17 KB
/
InboxCallButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import Navigation from '../libs/Navigation/Navigation';
import ROUTES from '../ROUTES';
import Tooltip from './Tooltip';
import Button from './Button';
import {Phone} from './Icon/Expensicons';
const propTypes = {
...withLocalizePropTypes,
/** The task ID to queue a call for */
taskID: PropTypes.string,
};
const defaultProps = {
taskID: '',
};
const InboxCallButton = props => (
<Tooltip
text={props.translate('requestCallPage.callButtonTooltip')}
containerStyles={[styles.justifyContentCenter, styles.alignItemsCenter]}
>
<Button
onPress={() => {
Navigation.navigate(ROUTES.getRequestCallRoute(props.taskID));
}}
text={props.translate('requestCallPage.callButton')}
small
icon={Phone}
/>
</Tooltip>
);
InboxCallButton.propTypes = propTypes;
InboxCallButton.defaultProps = defaultProps;
InboxCallButton.displayName = 'InboxCallButton';
export default withLocalize(InboxCallButton);