CloudLibrary
1 year ago
Settings
1 year ago
StarterSites
3 years ago
App.js
2 years ago
Card.js
3 years ago
CategoriesTabs.js
3 years ago
CategorySelector.js
2 years ago
CustomTooltip.js
3 years ago
DocNotice.js
2 years ago
EditorSelector.js
2 years ago
EditorTabs.js
4 years ago
Header.js
2 years ago
Icon.js
2 years ago
ImportModal.js
1 year ago
ImportModalError.js
2 years ago
ImportModalMock.js
4 years ago
ImportModalNote.js
4 years ago
ImportStepper.js
1 year ago
InstallModal.js
1 year ago
License.js
2 years ago
LicensePanelContext.js
3 years ago
Loading.js
4 years ago
Main.js
1 year ago
Migration.js
4 years ago
NewTCNotice.js
1 year ago
Notification.js
4 years ago
OnboardingContent.js
4 years ago
PreviewFrame.js
3 years ago
Search.js
2 years ago
StarterSiteCard.js
3 years ago
CustomTooltip.js
23 lines
| 1 | import { Icon, info } from '@wordpress/icons'; |
| 2 | |
| 3 | import classnames from 'classnames'; |
| 4 | |
| 5 | const CustomTooltip = ( { children, className, toLeft = false, rightOffset = 0 } ) => { |
| 6 | const tooltipClassNames = classnames( [ className, 'tiob-tooltip-wrap' ] ); |
| 7 | |
| 8 | const ttStyle = toLeft ? { right: rightOffset, left: 'unset' } : {}; |
| 9 | |
| 10 | return ( |
| 11 | <div className={ tooltipClassNames }> |
| 12 | <div className="tiob-tooltip-toggle"> |
| 13 | <Icon icon={ info } size={ 24 } /> |
| 14 | <div className="tiob-tooltip-content" style={ ttStyle }> |
| 15 | { children } |
| 16 | </div> |
| 17 | </div> |
| 18 | </div> |
| 19 | ); |
| 20 | }; |
| 21 | |
| 22 | export default CustomTooltip; |
| 23 |