diff --git a/CHANGELOG.md b/CHANGELOG.md
index b22ef047ba2..1735d9cb690 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)
-No public changes since 0.0.50
+- Added `textStyle="reverse"` prop to `EuiDescriptionList` as well as a class (`.eui-definitionListReverse`) for `dl`'s within `EuiText` ([#882](https://github.com/elastic/eui/pull/882))
+- Added `inspect` icon ([#886](https://github.com/elastic/eui/pull/886))
+- Added `layout` prop to `EuiCard` ([#885](https://github.com/elastic/eui/pull/885))
## [`0.0.50`](https://github.com/elastic/eui/tree/v0.0.50)
diff --git a/src-docs/src/views/card/card_example.js b/src-docs/src/views/card/card_example.js
index d8baa7dee52..c0492290371 100644
--- a/src-docs/src/views/card/card_example.js
+++ b/src-docs/src/views/card/card_example.js
@@ -9,6 +9,7 @@ import {
import {
EuiCode,
EuiCard,
+ EuiCallOut,
} from '../../../../src/components';
import Card from './card';
@@ -27,6 +28,10 @@ import CardBeta from './card_beta';
const cardBetaSource = require('!!raw-loader!./card_beta');
const cardBetaHtml = renderToHtml(CardBeta);
+import CardLayout from './card_layout';
+const cardLayoutSource = require('!!raw-loader!./card_layout');
+const cardLayoutHtml = renderToHtml(CardLayout);
+
export const CardExample = {
title: 'Card',
sections: [{
@@ -54,6 +59,30 @@ export const CardExample = {
props: { EuiCard },
demo: ,
},
+ {
+ title: 'Layout',
+ source: [{
+ type: GuideSectionTypes.JS,
+ code: cardLayoutSource,
+ }, {
+ type: GuideSectionTypes.HTML,
+ code: cardLayoutHtml,
+ }],
+ text: (
+
+
+ Most of the time, cards should read from top to bottom (vertical). However, in some cases, you may
+ want the icon to be to the left of the content. In this case, add the prop layout="horizontal" .
+
+
Horizontal layouts do not work with images, footers or textAlign . Therefore, these properties will be ignored.}
+ />
+
+ ),
+ components: { EuiCard },
+ demo: ,
+ },
{
title: 'Images',
source: [{
@@ -69,9 +98,9 @@ export const CardExample = {
Images can be added in place of, or in conjuction with, icons.
Just pass a url into the image prop and it will expand to to edges of the card.
-
- Make sure that all images are the same proportions when used in a singular row.
-
+ Make sure that all images are the same proportions when used in a singular row.}
+ />
),
components: { EuiCard },
diff --git a/src-docs/src/views/card/card_layout.js b/src-docs/src/views/card/card_layout.js
new file mode 100644
index 00000000000..d4b6854dad2
--- /dev/null
+++ b/src-docs/src/views/card/card_layout.js
@@ -0,0 +1,39 @@
+import React from 'react';
+
+import {
+ EuiCard,
+ EuiIcon,
+ EuiFlexGroup,
+ EuiFlexItem,
+} from '../../../../src/components';
+
+export default () => (
+
+
+ }
+ title={`Elastic Beats`}
+ description="Example of a card's description. Stick to one or two sentences."
+ onClick={() => window.alert('Card clicked')}
+ />
+
+
+ }
+ title={`Elastic Cloud`}
+ description="Example of a card's description. Stick to one or two sentences."
+ onClick={() => window.alert('Card clicked')}
+ />
+
+
+ window.alert('Card clicked')}
+ />
+
+
+);
diff --git a/src-docs/src/views/description_list/description_list_example.js b/src-docs/src/views/description_list/description_list_example.js
index 5839b344ef8..459183f5f4c 100644
--- a/src-docs/src/views/description_list/description_list_example.js
+++ b/src-docs/src/views/description_list/description_list_example.js
@@ -27,6 +27,10 @@ import DescriptionListInline from './description_list_inline';
const descriptionListInlineSource = require('!!raw-loader!./description_list_inline');
const descriptionListInlineHtml = renderToHtml(DescriptionListInline);
+import DescriptionListReverse from './description_list_reverse';
+const descriptionListReverseSource = require('!!raw-loader!./description_list_reverse');
+const descriptionListReverseHtml = renderToHtml(DescriptionListReverse);
+
export const DescriptionListExample = {
title: 'Description List',
sections: [{
@@ -48,6 +52,28 @@ export const DescriptionListExample = {
),
props: { EuiDescriptionList },
demo: ,
+ }, {
+ title: 'Reverse style',
+ source: [{
+ type: GuideSectionTypes.JS,
+ code: descriptionListReverseSource,
+ }, {
+ type: GuideSectionTypes.HTML,
+ code: descriptionListReverseHtml,
+ }],
+ text: (
+
+
+ Setting the textStyle prop to reverse will reverse
+ the text styles of the title and description elements
+ so that the description is more prominent. This works best for key/value type content.
+
+
+ Adding this property to the inline type will not change anything.
+
+
+ ),
+ demo: ,
}, {
title: 'As columns',
source: [{
diff --git a/src-docs/src/views/description_list/description_list_reverse.js b/src-docs/src/views/description_list/description_list_reverse.js
new file mode 100644
index 00000000000..e4326eec950
--- /dev/null
+++ b/src-docs/src/views/description_list/description_list_reverse.js
@@ -0,0 +1,24 @@
+import React from 'react';
+
+import {
+ EuiDescriptionList,
+} from '../../../../src/components';
+
+const favoriteVideoGame = [
+ {
+ title: 'Name',
+ description: 'The Elder Scrolls: Morrowind',
+ },
+ {
+ title: 'Game style',
+ description: 'Open-world, fantasy, action role-playing',
+ },
+ {
+ title: 'Release date',
+ description: '2002',
+ },
+];
+
+export default () => (
+
+);
diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js
index 81ee27e9940..6a692d4f3bc 100644
--- a/src-docs/src/views/icon/icons.js
+++ b/src-docs/src/views/icon/icons.js
@@ -72,6 +72,7 @@ const iconTypes = [
'indexMapping',
'indexOpen',
'indexSettings',
+ 'inspect',
'invert',
'inputOutput',
'kqlField',
diff --git a/src-docs/src/views/panel/panel_badge.js b/src-docs/src/views/panel/panel_badge.js
new file mode 100644
index 00000000000..93baca6ec2a
--- /dev/null
+++ b/src-docs/src/views/panel/panel_badge.js
@@ -0,0 +1,29 @@
+import React from 'react';
+
+import {
+ EuiPanel,
+ EuiFlexGroup,
+ EuiFlexItem,
+} from '../../../../src/components';
+
+const badges = [null, 'Beta', 'Lab'];
+
+const panelNodes = badges.map(function (item, index) {
+ return (
+
+ window.alert('Card clicked')}
+ >
+ I am some panel content
+
+
+ );
+});
+
+export default () => (
+
+ {panelNodes}
+
+);
diff --git a/src-docs/src/views/panel/panel_example.js b/src-docs/src/views/panel/panel_example.js
index d908fbdd2aa..c1bd998fd83 100644
--- a/src-docs/src/views/panel/panel_example.js
+++ b/src-docs/src/views/panel/panel_example.js
@@ -21,6 +21,10 @@ import PanelHover from './panel_hover';
const panelHoverSource = require('!!raw-loader!./panel_hover');
const panelHoverHtml = renderToHtml(PanelHover);
+import PanelBadge from './panel_badge';
+const panelBadgeSource = require('!!raw-loader!./panel_badge');
+const panelBadgeHtml = renderToHtml(PanelBadge);
+
export const PanelExample = {
title: 'Panel',
sections: [{
@@ -56,5 +60,21 @@ export const PanelExample = {
),
demo: ,
+ }, {
+ title: 'Panel beta badges',
+ source: [{
+ type: GuideSectionTypes.JS,
+ code: panelBadgeSource,
+ }, {
+ type: GuideSectionTypes.HTML,
+ code: panelBadgeHtml,
+ }],
+ text: (
+
+ Similar to EuiCard panels can also accept
+ an EuiBetaBadge.
+
+ ),
+ demo: ,
}],
};
diff --git a/src-docs/src/views/text/text.js b/src-docs/src/views/text/text.js
index e4f10435348..2c5a0102caf 100644
--- a/src-docs/src/views/text/text.js
+++ b/src-docs/src/views/text/text.js
@@ -124,6 +124,29 @@ export default () => (
The game that made me drop out of college.
+
+
+
+
+
+ Name
+
+
+ The Elder Scrolls: Morrowind
+
+
+ Game style
+
+
+ Open-world, fantasy, action role-playing
+
+
+ Release date
+
+
+ 2002
+
+
);
diff --git a/src/components/badge/beta_badge/_index.scss b/src/components/badge/beta_badge/_index.scss
index 10c53901b29..166e3b0878c 100644
--- a/src/components/badge/beta_badge/_index.scss
+++ b/src/components/badge/beta_badge/_index.scss
@@ -1 +1,2 @@
+@import 'mixins';
@import 'beta_badge';
diff --git a/src/components/badge/beta_badge/_mixins.scss b/src/components/badge/beta_badge/_mixins.scss
new file mode 100644
index 00000000000..a07c59f3f58
--- /dev/null
+++ b/src/components/badge/beta_badge/_mixins.scss
@@ -0,0 +1,30 @@
+
+/**
+ * 1. Extend beta badges to at least 40% of the card's width
+ */
+
+@mixin hasBetaBadge($selector, $spacing: $euiSize) {
+ &.#{$selector}--hasBetaBadge {
+ position: relative;
+
+ .#{$selector}__betaBadgeWrapper {
+ position: absolute;
+ top: $euiSizeL/-2;
+ left: 50%;
+ transform: translateX(-50%);
+ z-index: 3; // get above abs positioned image
+ min-width: 40%; /* 1 */
+ max-width: calc(100% - #{$spacing*2});
+
+ .euiToolTipAnchor,
+ .#{$selector}__betaBadge {
+ width: 100%; /* 1 */
+ }
+
+ .#{$selector}__betaBadge {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+}
diff --git a/src/components/card/__snapshots__/card.test.js.snap b/src/components/card/__snapshots__/card.test.js.snap
index 1746900d97e..dcb7ed2c7de 100644
--- a/src/components/card/__snapshots__/card.test.js.snap
+++ b/src/components/card/__snapshots__/card.test.js.snap
@@ -1,8 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`EuiCard horizontal 1`] = `
+
+`;
+
exports[`EuiCard icon 1`] = `
tag
- * 4. Fix for IE where the image correctly resizes in width but doesn't collapse it's height
+ * 2. Fix for IE to ensure badges are visible outside of a tag
+ * 3. Fix for IE where the image correctly resizes in width but doesn't collapse it's height
(https://github.com/philipwalton/flexbugs/issues/75#issuecomment-134702421)
+ * 4. Horizontal layouts should always top left align no matter the textAlign prop
*/
// EuiCard specific
@@ -20,31 +21,9 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
display: flex;
flex-direction: column;
padding: $euiCardSpacing;
- overflow: visible; /* 3 */
+ overflow: visible; /* 2 */
- &.euiCard--hasBetaBadge {
- position: relative;
-
- .euiCard__betaBadgeWrapper {
- position: absolute;
- top: $euiSizeL/-2;
- left: 50%;
- transform: translateX(-50%);
- z-index: 3; // get above abs positioned image
- min-width: 40%; /* 2 */
- max-width: calc(100% - #{$euiCardSpacing*2});
-
- .euiToolTipAnchor,
- .euiCard__betaBadge {
- width: 100%; /* 2 */
- }
-
- .euiCard__betaBadge {
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
+ @include hasBetaBadge($selector: 'euiCard', $spacing: $euiCardSpacing);
.euiCard__top,
.euiCard__content,
@@ -86,7 +65,7 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
.euiCard__top {
flex-grow: 0; /* 1 */
position: relative;
- min-height: 1px; /* 4 */
+ min-height: 1px; /* 3 */
.euiCard__icon {
margin-top: $euiCardSpacing/2;
@@ -138,3 +117,28 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
flex-grow: 0; /* 1 */
margin-top: $euiCardSpacing;
}
+
+.euiCard.euiCard--horizontal {
+ .euiCard__content {
+ padding-top: $euiSizeS; // Aligns title and text a bit better and adds spacing in case of beta badge
+ text-align: left; /* 4 */
+ }
+}
+
+// Only change the flex direction if the card has an icon
+// otherwise the button tag won't properly align contents to top
+.euiCard.euiCard--horizontal.euiCard--hasIcon {
+ flex-direction: row;
+ align-items: flex-start !important; /* 4 */
+
+ .euiCard__top,
+ .euiCard__content {
+ width: auto; // Makes sure the top shrinks and the content grows
+ margin-top: 0;
+ }
+
+ .euiCard__top .euiCard__icon {
+ margin-top: 0;
+ margin-right: $euiSize;
+ }
+}
diff --git a/src/components/card/card.js b/src/components/card/card.js
index 80687543b50..789c09257cd 100644
--- a/src/components/card/card.js
+++ b/src/components/card/card.js
@@ -14,6 +14,27 @@ const textAlignToClassNameMap = {
export const ALIGNMENTS = Object.keys(textAlignToClassNameMap);
+const layoutToClassNameMap = {
+ vertical: '',
+ horizontal: 'euiCard--horizontal',
+};
+
+export const LAYOUT_ALIGNMENTS = Object.keys(layoutToClassNameMap);
+const oneOfLayouts = PropTypes.oneOf(LAYOUT_ALIGNMENTS);
+
+const cardLayout = (props, propName, componentName, ...rest) => {
+ const oneOfResult = oneOfLayouts(props, propName, componentName, ...rest);
+ if (oneOfResult) return oneOfResult;
+
+ if (props[propName] === 'horizontal' ) {
+ if (props.image || props.footer) {
+ return new Error(
+ `${componentName}: '${propName} = horizontal' cannot be used in conjunction with 'image', 'footer', or 'textAlign'.`
+ );
+ }
+ }
+};
+
export const EuiCard = ({
className,
description,
@@ -28,20 +49,23 @@ export const EuiCard = ({
betaBadgeLabel,
betaBadgeTooltipContent,
betaBadgeTitle,
+ layout,
...rest,
}) => {
const classes = classNames(
'euiCard',
textAlignToClassNameMap[textAlign],
+ layoutToClassNameMap[layout],
{
'euiCard--isClickable': onClick || href || isClickable,
'euiCard--hasBetaBadge': betaBadgeLabel,
+ 'euiCard--hasIcon': icon,
},
className,
);
let imageNode;
- if (image) {
+ if (image && layout === 'vertical') {
imageNode = (
);
@@ -63,7 +87,7 @@ export const EuiCard = ({
}
let optionalCardTop;
- if (image || icon) {
+ if (imageNode || iconNode) {
optionalCardTop = (
{imageNode}
@@ -102,9 +126,11 @@ export const EuiCard = ({
-
- {footer}
-
+ {layout === 'vertical' &&
+
+ {footer}
+
+ }
);
};
@@ -136,6 +162,11 @@ EuiCard.propTypes = {
href: PropTypes.string,
textAlign: PropTypes.oneOf(ALIGNMENTS),
+ /**
+ * Change to "horizontal" if you need the icon to be left of the content
+ */
+ layout: cardLayout,
+
/**
* Add a badge to the card to label it as "Beta" or other non-GA state
*/
@@ -154,4 +185,5 @@ EuiCard.propTypes = {
EuiCard.defaultProps = {
textAlign: 'center',
+ layout: 'vertical',
};
diff --git a/src/components/card/card.test.js b/src/components/card/card.test.js
index 649127076cf..b31fb6ee137 100644
--- a/src/components/card/card.test.js
+++ b/src/components/card/card.test.js
@@ -33,6 +33,19 @@ describe('EuiCard', () => {
.toMatchSnapshot();
});
+ test('horizontal', () => {
+ const component = render(
+
+ );
+
+ expect(component)
+ .toMatchSnapshot();
+ });
+
describe('onClick', () => {
it('supports onClick as a link', () => {
const handler = jest.fn();
diff --git a/src/components/description_list/_description_list.scss b/src/components/description_list/_description_list.scss
index 54159f632e8..d7ec9c1caaf 100644
--- a/src/components/description_list/_description_list.scss
+++ b/src/components/description_list/_description_list.scss
@@ -25,6 +25,18 @@
text-align: right;
}
+ // Reversed makes the description larger than the title
+ &.euiDescriptionList--reverse {
+ .euiDescriptionList__title {
+ @include euiText;
+ @include euiFontSizeS;
+ }
+
+ .euiDescriptionList__description {
+ @include euiTitle("xs");
+ }
+ }
+
// Compressed gets smaller fonts.
&.euiDescriptionList--compressed {
@@ -35,6 +47,17 @@
.euiDescriptionList__description {
@include euiFontSizeS;
}
+
+ &.euiDescriptionList--reverse {
+ .euiDescriptionList__title {
+ @include euiText;
+ @include euiFontSizeS;
+ }
+
+ .euiDescriptionList__description {
+ @include euiTitle("xxs");
+ }
+ }
}
}
@@ -73,6 +96,17 @@
}
}
+ &.euiDescriptionList--reverse {
+ .euiDescriptionList__title {
+ @include euiText;
+ @include euiFontSize;
+ }
+
+ .euiDescriptionList__description {
+ @include euiTitle("xs");
+ }
+ }
+
&.euiDescriptionList--compressed {
.euiDescriptionList__title {
@@ -82,6 +116,17 @@
.euiDescriptionList__description {
@include euiFontSizeS;
}
+
+ &.euiDescriptionList--reverse {
+ .euiDescriptionList__title {
+ @include euiText;
+ @include euiFontSizeS;
+ }
+
+ .euiDescriptionList__description {
+ @include euiTitle("xxs");
+ }
+ }
}
}
diff --git a/src/components/description_list/description_list.js b/src/components/description_list/description_list.js
index 06a49dcf994..aeb31bf709d 100644
--- a/src/components/description_list/description_list.js
+++ b/src/components/description_list/description_list.js
@@ -25,12 +25,20 @@ const alignmentsToClassNameMap = {
export const ALIGNMENTS = Object.keys(alignmentsToClassNameMap);
+const textStylesToClassNameMap = {
+ normal: '',
+ reverse: 'euiDescriptionList--reverse',
+};
+
+export const TEXT_STYLES = Object.keys(textStylesToClassNameMap);
+
export const EuiDescriptionList = ({
children,
className,
listItems,
align,
compressed,
+ textStyle,
type,
...rest
}) => {
@@ -38,6 +46,7 @@ export const EuiDescriptionList = ({
'euiDescriptionList',
typesToClassNameMap[type],
alignmentsToClassNameMap[align],
+ textStylesToClassNameMap[textStyle],
{
'euiDescriptionList--compressed': compressed,
},
@@ -74,19 +83,38 @@ export const EuiDescriptionList = ({
};
EuiDescriptionList.propTypes = {
- children: PropTypes.node,
- className: PropTypes.string,
listItems: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.node,
description: PropTypes.node,
})),
+ children: PropTypes.node,
+ className: PropTypes.string,
+
+ /**
+ * Text alignment
+ */
+ align: PropTypes.oneOf(ALIGNMENTS),
+
+ /**
+ * Smaller text and condensed spacing
+ */
compressed: PropTypes.bool,
+
+ /**
+ * How should the content be styled, by default
+ * this will emphasize the title
+ */
+ textStyle: PropTypes.oneOf(TEXT_STYLES),
+
+ /**
+ * How each item should be layed out
+ */
type: PropTypes.oneOf(TYPES),
- align: PropTypes.oneOf(ALIGNMENTS),
};
EuiDescriptionList.defaultProps = {
- type: 'row',
align: 'left',
compressed: false,
+ textStyle: 'normal',
+ type: 'row',
};
diff --git a/src/components/icon/__snapshots__/icon.test.js.snap b/src/components/icon/__snapshots__/icon.test.js.snap
index c3c81696d24..0d9140ee105 100644
--- a/src/components/icon/__snapshots__/icon.test.js.snap
+++ b/src/components/icon/__snapshots__/icon.test.js.snap
@@ -1948,6 +1948,20 @@ exports[`EuiIcon renders type inputOutput 1`] = `
`;
+exports[`EuiIcon renders type inspect 1`] = `
+
+
+
+`;
+
exports[`EuiIcon renders type invert 1`] = `
+
+
diff --git a/src/components/icon/icon.js b/src/components/icon/icon.js
index 937a6843749..f743b7a4ab3 100644
--- a/src/components/icon/icon.js
+++ b/src/components/icon/icon.js
@@ -80,6 +80,7 @@ import indexMapping from './assets/index_mapping.svg';
import indexOpen from './assets/index_open.svg';
import indexPatternApp from './assets/app_index_pattern.svg';
import indexSettings from './assets/index_settings.svg';
+import inspect from './assets/inspect.svg';
import invert from './assets/invert.svg';
import inputOutput from './assets/inputOutput.svg';
import kqlField from './assets/kql_field.svg';
@@ -248,6 +249,7 @@ const typeToIconMap = {
indexOpen,
indexPatternApp,
indexSettings,
+ inspect,
invert,
inputOutput,
kqlField,
diff --git a/src/components/panel/_panel.scss b/src/components/panel/_panel.scss
index f895d2b354d..1de70adbd80 100644
--- a/src/components/panel/_panel.scss
+++ b/src/components/panel/_panel.scss
@@ -1,9 +1,20 @@
+@import '../badge/beta_badge/mixins';
+
// Export basic class & modifiers
@include euiPanel($selector: 'euiPanel');
+.euiPanel {
+ @include hasBetaBadge($selector: 'euiPanel');
+}
+
// Specific
@each $modifier, $amount in $euiPanelPaddingModifiers {
.euiPanel.euiPanel--#{$modifier} {
padding: $amount;
+
+ // Overwrite @hasBetaBadge max-width depending upon padding
+ .euiPanel__betaBadgeWrapper {
+ max-width: calc(100% - #{$amount*2});
+ }
}
}
diff --git a/src/components/panel/panel.js b/src/components/panel/panel.js
index 5b0f8cc9831..d2acb636be4 100644
--- a/src/components/panel/panel.js
+++ b/src/components/panel/panel.js
@@ -2,6 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
+import { EuiBetaBadge } from '../badge/beta_badge';
+
const paddingSizeToClassNameMap = {
none: null,
s: 'euiPanel--paddingSmall',
@@ -19,6 +21,9 @@ export const EuiPanel = ({
grow,
panelRef,
onClick,
+ betaBadgeLabel,
+ betaBadgeTooltipContent,
+ betaBadgeTitle,
...rest
}) => {
@@ -29,6 +34,7 @@ export const EuiPanel = ({
'euiPanel--shadow': hasShadow,
'euiPanel--flexGrowZero': !grow,
'euiPanel--isClickable': onClick,
+ 'euiPanel--hasBetaBadge': betaBadgeLabel,
},
className
);
@@ -46,8 +52,18 @@ export const EuiPanel = ({
props.onClick = onClick;
}
+ let optionalBetaBadge;
+ if (betaBadgeLabel) {
+ optionalBetaBadge = (
+
+
+
+ )
+ }
+
return (
+ {optionalBetaBadge}
{children}
);
@@ -57,11 +73,34 @@ export const EuiPanel = ({
EuiPanel.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
+ /**
+ * If active, adds a deeper shadow to the panel
+ */
hasShadow: PropTypes.bool,
+ /**
+ * Padding applied to the panel
+ */
paddingSize: PropTypes.oneOf(SIZES),
+ /**
+ * When true the panel will grow to match `EuiFlexItem`
+ */
grow: PropTypes.bool,
panelRef: PropTypes.func,
onClick: PropTypes.func,
+ /**
+ * Add a badge to the panel to label it as "Beta" or other non-GA state
+ */
+ betaBadgeLabel: PropTypes.string,
+
+ /**
+ * Add a description to the beta badge (will appear in a tooltip)
+ */
+ betaBadgeTooltipContent: PropTypes.node,
+
+ /**
+ * Optional title will be supplied as tooltip title or title attribute otherwise the label will be used
+ */
+ betaBadgeTitle: PropTypes.string,
};
EuiPanel.defaultProps = {
diff --git a/src/components/text/_text.scss b/src/components/text/_text.scss
index 83785d45c47..9802edf818c 100644
--- a/src/components/text/_text.scss
+++ b/src/components/text/_text.scss
@@ -7,7 +7,6 @@
ul,
ol,
dl,
- dd,
blockquote,
img,
pre {
@@ -32,6 +31,10 @@
margin-bottom: convertToRem($baseLineHeightMultiplier * 1);
}
+ dd + dt {
+ margin-top: convertToRem($baseLineHeightMultiplier * 2);
+ }
+
* + h2,
* + h3,
* + h4,
@@ -56,10 +59,16 @@
}
h4,
- dt {
+ dt,
+ dl.eui-definitionListReverse dd {
font-size: convertToRem($baseFontSize * nth($euiTextScale, 5)); // skip level 4 on purpose
}
+ dl.eui-definitionListReverse dt {
+ font-size: convertToRem($baseFontSize * nth($euiTextScale, 7));
+ color: $euiTextColor;
+ }
+
h5 {
font-size: convertToRem($baseFontSize * nth($euiTextScale, 6));
line-height: convertToRem($baseLineHeightMultiplier * 2);
@@ -132,6 +141,7 @@
content: "";
height: 2px;
width: 50%;
+ right: 0;
transform: translateX(-50%);
background: $euiColorDarkShade;
}