| 1 |
import React from 'react'; |
| 2 |
const { __ } = wp.i18n; |
| 3 |
|
| 4 |
const tagGroupsHelp = (props) => { |
| 5 |
let href; |
| 6 |
|
| 7 |
if (props.topic === 'transform-your-block-for-more-options') { |
| 8 |
href = |
| 9 |
props.url + |
| 10 |
props.product + |
| 11 |
'/front-end-features/how-to-use-gutenberg-blocks/#transforming-blocks-to-shortcodes'; |
| 12 |
} else { |
| 13 |
href = props.url + props.product + '/' + props.feature; |
| 14 |
|
| 15 |
if ('' != props.siteLang) { |
| 16 |
href += '?lang=' + props.siteLang; |
| 17 |
} |
| 18 |
|
| 19 |
href += '#' + props.topic; |
| 20 |
} |
| 21 |
|
| 22 |
if (props.url || props.url !== '' || href || href !== '') { |
| 23 |
return ''; |
| 24 |
} |
| 25 |
|
| 26 |
return ( |
| 27 |
<div> |
| 28 |
<a |
| 29 |
href={href} |
| 30 |
target='_blank' |
| 31 |
style={{ textDecoration: 'none' }} |
| 32 |
title={__('Click for help!')} |
| 33 |
> |
| 34 |
<span className='dashicons dashicons-editor-help tg_right chatty-mango-help-icon'></span> |
| 35 |
</a> |
| 36 |
</div> |
| 37 |
); |
| 38 |
}; |
| 39 |
|
| 40 |
export default tagGroupsHelp; |
| 41 |
|