-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiTooltip] Revert "Remove tooltip focus on mousemove (#3335)" and f…
…orce visibility while element is focused (#5066) * Revert "Remove tooltip focus on mousemove (#3335)" * Applying `onFocus` and `onBlur` methods to child clone * Put default value for `display` in `defaultProps` so it populates in the props table * [EuiIconTip] Removing `children` from TS
- Loading branch information
Showing
11 changed files
with
217 additions
and
128 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
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,47 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
EuiToolTip, | ||
EuiFieldText, | ||
EuiSpacer, | ||
EuiButton, | ||
} from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<div> | ||
<EuiToolTip | ||
position="top" | ||
content={ | ||
<p> | ||
Works on any kind of element — buttons, inputs, you name it! | ||
</p> | ||
} | ||
> | ||
<EuiButton onClick={() => {}}>Hover me</EuiButton> | ||
</EuiToolTip> | ||
|
||
<EuiSpacer /> | ||
|
||
<EuiToolTip | ||
position="top" | ||
content="Here is some tooltip text." | ||
display="block" | ||
> | ||
<EuiButton fullWidth> | ||
I am a block level tooltip, applied to a button with fullWidth | ||
</EuiButton> | ||
</EuiToolTip> | ||
|
||
<EuiSpacer /> | ||
|
||
<EuiToolTip | ||
position="right" | ||
content="Tooltip remains visible while the child is focused." | ||
> | ||
<EuiFieldText | ||
placeholder="Focus me" | ||
aria-label="Example of input wrapped with tooltip" | ||
/> | ||
</EuiToolTip> | ||
</div> | ||
); |
Oops, something went wrong.