Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltips Style #193

Merged
merged 8 commits into from
Dec 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- Add `scope` prop to `<EuiTableHeaderCell>` and `<EuiTableHeaderCellCheckbox>` ([#171](https://github.com/elastic/eui/pull/171))
- Add `disabled` prop to `<EuiContextMenuItem>` ([#172](https://github.com/elastic/eui/pull/172))
- Add `<EuiTablePagination>` component and `Pager` service ([#178](https://github.com/elastic/eui/pull/178))
- Add `<Tooltip>` component ([#174](https://github.com/elastic/eui/pull/174), [#193](https://github.com/elastic/eui/pull/193))
- Add a bold weight of 700 and apply it to `<strong>` elements by default ([#193](https://github.com/elastic/eui/pull/193))
- Icon size prop now accepts `s`. Adjusted coloring of sidenav arrows ([#178](https://github.com/elastic/eui/pull/197))

**Bug fixes**
Expand Down
35 changes: 22 additions & 13 deletions src-docs/src/views/tooltip/examples.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

import {
EuiLink,
TooltipTrigger,
} from '../../../../src/components';

Expand All @@ -11,47 +12,55 @@ then what is the point?`;

export default () => (
<div>
<div>
<div style={{ overflow: 'hidden' }}>
Check out this {(
<TooltipTrigger tooltip="I am the body" title="I am the title">
<span className="overlay-trigger" tabIndex="0"> tooltip with title.</span>
<TooltipTrigger tooltip={autoPlacementTooltip} title="I am the title" size="m">
<EuiLink>medium tooltip</EuiLink>
</TooltipTrigger>
)}
)} with <strong>title</strong>.
</div>
<br/>
<br/>
<div>
Check out this {(
<TooltipTrigger tooltip={autoPlacementTooltip} placement="top" size="m">
<span className="overlay-trigger" tabIndex="0"> tooltip on the top.</span>
<TooltipTrigger tooltip="I should be on the top" placement="top" >
<EuiLink>tooltip on the <strong>top</strong>.</EuiLink>
</TooltipTrigger>
)}
</div>
<br/>
<br/>
<div>
Check out this {(
<TooltipTrigger tooltip={autoPlacementTooltip} placement="top" size="m" trigger="click">
<span className="overlay-trigger" tabIndex="0"> tooltip on click.</span>
<EuiLink> tooltip on <strong>click</strong>.</EuiLink>
</TooltipTrigger>
)}
</div>
<br/>
<br/>
<div>
Check out this {(
<TooltipTrigger tooltip="I should be on the left" placement="left">
<span className="overlay-trigger" tabIndex="0"> tooltip on the left.</span>
<TooltipTrigger tooltip={autoPlacementTooltip} placement="left" size="l">
<EuiLink>large tooltip on the <strong>left</strong>.</EuiLink>
</TooltipTrigger>
)}
</div>

<br/>
<br/>
<div>
Check out this {(
<TooltipTrigger tooltip="I should be on the right" placement="right">
<span className="overlay-trigger" tabIndex="0"> tooltip on the right.</span>
<EuiLink>tooltip on the <strong>right</strong>.</EuiLink>
</TooltipTrigger>
)}
</div>

<br/>
<br/>
<div>
Check out this {(
<TooltipTrigger tooltip="I should be on the bottom" placement="bottom">
<span className="overlay-trigger" tabIndex="0"> tooltip on the bottom.</span>
<EuiLink>tooltip on the <strong>bottom</strong>.</EuiLink>
</TooltipTrigger>
)}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/tooltip/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "mixins";
@import "tooltip";
7 changes: 7 additions & 0 deletions src/components/tooltip/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin euiTooltipSize($multiplier){
max-width: $euiSize * $multiplier;

.euiTooltip__content {
white-space: inherit; // allow text wrapping of content
}
}
Loading