@@ -11,18 +11,20 @@ import dynamicsFont from '../../assets/DynamicsFont/DynamicsFont.scss';
1111
1212function ClickToDialButton ( {
1313 className,
14- currentLocale,
1514 onClickToDial,
1615 disableLinks,
1716 disableClickToDial,
1817 phoneNumber,
18+ title,
1919} ) {
2020 return (
2121 < Button
2222 className = { classnames ( styles . call , className ) }
2323 onClick = { onClickToDial }
2424 disabled = { disableLinks || disableClickToDial || ! phoneNumber } >
25- < span className = { dynamicsFont . call } />
25+ < span
26+ className = { dynamicsFont . call }
27+ title = { title } />
2628 </ Button >
2729 ) ;
2830}
@@ -32,7 +34,6 @@ ClickToDialButton.propTypes = {
3234 disableLinks : PropTypes . bool ,
3335 disableClickToDial : PropTypes . bool ,
3436 phoneNumber : PropTypes . string ,
35- currentLocale : PropTypes . string . isRequired ,
3637} ;
3738ClickToDialButton . defaultProps = {
3839 className : undefined ,
@@ -44,17 +45,19 @@ ClickToDialButton.defaultProps = {
4445
4546function ClickToSmsButton ( {
4647 className,
47- currentLocale,
4848 onClickToSms,
4949 disableLinks,
5050 phoneNumber,
51+ title,
5152} ) {
5253 return (
5354 < Button
5455 className = { classnames ( styles . sms , className ) }
5556 onClick = { onClickToSms }
5657 disabled = { disableLinks || ! phoneNumber } >
57- < span className = { dynamicsFont . composeText } />
58+ < span
59+ className = { dynamicsFont . composeText }
60+ title = { title } />
5861 </ Button >
5962 ) ;
6063}
@@ -63,7 +66,6 @@ ClickToSmsButton.propTypes = {
6366 onClickToSms : PropTypes . func ,
6467 disableLinks : PropTypes . bool ,
6568 phoneNumber : PropTypes . string ,
66- currentLocale : PropTypes . string . isRequired ,
6769} ;
6870ClickToSmsButton . defaultProps = {
6971 className : undefined ,
@@ -74,12 +76,13 @@ ClickToSmsButton.defaultProps = {
7476
7577function EntityButton ( {
7678 className,
77- currentLocale,
7879 onViewEntity,
7980 onCreateEntity,
8081 hasEntity,
8182 isCreating,
8283 disableLinks,
84+ viewEntityTitle,
85+ createEntityTitle,
8386} ) {
8487 // console.debug('isCreating', isCreating);
8588 const spinner = isCreating ?
@@ -91,14 +94,17 @@ function EntityButton({
9194 null ;
9295 const icon = hasEntity ? dynamicsFont . record : dynamicsFont . addEntity ;
9396 const onClick = hasEntity ? onViewEntity : onCreateEntity ;
94-
97+ const title = hasEntity ? viewEntityTitle : createEntityTitle ;
9598 return (
9699 < Button
97100 className = { classnames ( styles . entity , className ) }
98101 onClick = { onClick }
99102 disabled = { disableLinks } >
100103
101- < span className = { icon } />
104+ < span
105+ className = { icon }
106+ title = { title }
107+ />
102108 { spinner }
103109 </ Button >
104110 ) ;
@@ -110,7 +116,6 @@ EntityButton.propTypes = {
110116 hasEntity : PropTypes . bool ,
111117 isCreating : PropTypes . bool ,
112118 disableLinks : PropTypes . bool ,
113- currentLocale : PropTypes . string . isRequired ,
114119} ;
115120EntityButton . defaultProps = {
116121 className : undefined ,
@@ -171,6 +176,12 @@ export default class ActionMenu extends Component {
171176 disableLinks,
172177 disableClickToDial,
173178 stopPropagation,
179+ addLogTitle,
180+ editLogTitle,
181+ callTitle,
182+ textTitle,
183+ createEntityTitle,
184+ viewEntityTitle,
174185 } = this . props ;
175186
176187 const logButton = onLog ?
@@ -182,6 +193,8 @@ export default class ActionMenu extends Component {
182193 isLogged = { isLogged }
183194 isLogging = { isLogging }
184195 currentLocale = { currentLocale }
196+ addTitle = { addLogTitle }
197+ editTitle = { editLogTitle }
185198 />
186199 ) :
187200 null ;
@@ -193,15 +206,15 @@ export default class ActionMenu extends Component {
193206 onViewEntity = { onViewEntity }
194207 hasEntity = { hasEntity }
195208 disableLinks = { disableLinks }
196- currentLocale = { currentLocale }
209+ viewEntityTitle = { viewEntityTitle }
197210 /> ) ;
198211 } else if ( ! hasEntity && phoneNumber && onCreateEntity ) {
199212 entityButton = ( < EntityButton
200213 className = { styles . baseGroup }
201214 onCreateEntity = { this . openEntityModal }
202215 hasEntity = { hasEntity }
203216 disableLinks = { disableLinks }
204- currentLocale = { currentLocale }
217+ createEntityTitle = { createEntityTitle }
205218 /> ) ;
206219 } else {
207220 entityButton = null ;
@@ -227,6 +240,7 @@ export default class ActionMenu extends Component {
227240 disableLinks = { disableLinks }
228241 disableClickToDial = { disableClickToDial }
229242 currentLocale = { currentLocale }
243+ title = { callTitle }
230244 />
231245 ) :
232246 null ;
@@ -238,6 +252,7 @@ export default class ActionMenu extends Component {
238252 phoneNumber = { phoneNumber }
239253 disableLinks = { disableLinks }
240254 currentLocale = { currentLocale }
255+ title = { textTitle }
241256 />
242257 ) :
243258 null ;
@@ -300,6 +315,12 @@ ActionMenu.propTypes = {
300315 disableClickToDial : PropTypes . bool ,
301316 stopPropagation : PropTypes . bool ,
302317 captureClick : PropTypes . bool ,
318+ addLogTitle : PropTypes . string ,
319+ editLogTitle : PropTypes . string ,
320+ textTitle : PropTypes . string ,
321+ callTitle : PropTypes . string ,
322+ createEntityTitle : PropTypes . string ,
323+ viewEntityTitle : PropTypes . string ,
303324} ;
304325ActionMenu . defaultProps = {
305326 className : undefined ,
@@ -317,4 +338,10 @@ ActionMenu.defaultProps = {
317338 disableClickToDial : false ,
318339 stopPropagation : false ,
319340 captureClick : false ,
341+ addLogTitle : undefined ,
342+ editLogTitle : undefined ,
343+ textTitle : undefined ,
344+ callTitle : undefined ,
345+ createEntityTitle : undefined ,
346+ viewEntityTitle : undefined ,
320347} ;
0 commit comments