-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
115 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useState } from '@wordpress/element'; | ||
import { Dashicon, Popover } from '@wordpress/components'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
function TrunkPopover() { | ||
const [ isPopoverVisible, setIsPopoverVisible ] = useState( false ); | ||
|
||
const showPopover = () => { | ||
setIsPopoverVisible(true); | ||
}; | ||
|
||
const hidePopover = () => { | ||
setIsPopoverVisible(false); | ||
}; | ||
|
||
return ( | ||
<div className={'wpr-popover-wrap'}> | ||
<Dashicon icon={'info'} onMouseEnter={showPopover} onMouseLeave={hidePopover} /> | ||
{isPopoverVisible && ( | ||
<Popover position={'top'} className={'wpr-popover'} variant={'unstyled'} onClose={hidePopover} noArrow={false}> | ||
{__( 'Trunk is where the most current revisions of the code should be stored, often representing the development version of the software. This is particularly relevant for developers and testers who are working with the very latest code changes that have not yet been released to the public.', 'wp-rollback' )} | ||
</Popover> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default TrunkPopover; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters