Closed eliorivero closed 7 years ago
We need to prefix all the .info-popover
classes with dops-
so .info-popover
would be .dops-info-popover
Other than that, I tested it and it looks good.
Thanks for the review! I've prefixed the classes and also removed adding the class dops-popover
since that one is always added in Popover
component and it was duplicated.
@eliorivero Thanks!
This component will be used in https://github.com/Automattic/jetpack/pull/5878 Sample:
InfoPopover
InfoPopover
is a component based onPopover
used to show a popover as a tooltip to aGridicon
.InfoPopover
Propertiesposition
The
position
property can be one of the following values:top
top left
top right
bottom
bottom left
bottom right
left
right
className
The
className
lets you specify the style class that the element should have.gaEventCategory
The
gaEventCategory
lets you specify the Google Analyics Category that you want the toggle event to have. Also reqires thepopoverName
attribute.popoverName
The
popoverName
lets you specify the Google Analyics Event name that you want the toggle event to have. Also reqires thegaEventCategory
attribute.Turns into this even when opened: analytics.ga.recordEvent( gaEventCategory, 'InfoPopover: ' + popoverName + 'Opened' );
ignoreContext
The
ignoreContext
lets you specify a component that you want to be on the inside clickOutside context. So a context that you want to ignore. In most cases this is not needed but if you want to also have a label that can trigger the opening and closing of the InfoPopover then you need to pass in the label component as a reference.screenReaderText
This optional property admits a string that will be wrapped in a span.screen-reader-text and used for accesibility.
Basic
InfoPopover
Usage