diff --git a/CHANGELOG.md b/CHANGELOG.md index 16eccf6b8ff..46eb27617af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,13 @@ # [`master`](https://github.com/elastic/eui/tree/master) -- Add disabled prop to `EuiComboBoxOption` ([#650](https://github.com/elastic/eui/pull/650)) -- Added export of sass theme variables in json format during compilation ([#642](https://github.com/elastic/eui/pull/642)) +- Added `disabled` prop to `EuiComboBoxOption` ([#650](https://github.com/elastic/eui/pull/650)) +- Added support for `
` and `` tags to `` ([#654](https://github.com/elastic/eui/pull/654))
+- Added export of SASS theme variables in JSON format during compilation ([#642](https://github.com/elastic/eui/pull/642))
# [`0.0.40`](https://github.com/elastic/eui/tree/v0.0.40)
- Tweaked sizing, weights, color, line-heights, and added more levels to `EuiTitle` and `EuiText` ([#627](https://github.com/elastic/eui/pull/627))
-- Add TypeScript type defitions for `EuiPortal`, `EuiText` and `EuiTitle` as well as the `calculatePopoverPosition` service ([#638](https://github.com/elastic/eui/pull/638))
+- Added TypeScript type defitions for `EuiPortal`, `EuiText` and `EuiTitle` as well as the `calculatePopoverPosition` service ([#638](https://github.com/elastic/eui/pull/638))
- Grayed out labels for `disabled` controls ([#648](https://github.com/elastic/eui/pull/648))
**Bug fixes**
@@ -27,7 +28,7 @@
# [`0.0.38`](https://github.com/elastic/eui/tree/v0.0.38)
- Modified drop shadow intensities and color. ([#607](https://github.com/elastic/eui/pull/607))
-- Added Sass color functions. Made `$euiColorWarning` color usage more accessible while still being "yellow". ([#628](https://github.com/elastic/eui/pull/628))
+- Added SASS color functions. Made `$euiColorWarning` color usage more accessible while still being "yellow". ([#628](https://github.com/elastic/eui/pull/628))
- Removed extraneous `global_styling/mixins/_forms.scss` file and importing the correct files in the `filter_group.scss` and `combo_box.scss` files. ([#609](https://github.com/elastic/eui/pull/609))
- Added `isInvalid` prop to `EuiComboBox` ([#631](https://github.com/elastic/eui/pull/631))
- Added support for rejecting user input by returning `false` from the `onCreateOption` prop of `EuiComboBox` ([#631](https://github.com/elastic/eui/pull/631))
diff --git a/src-docs/src/views/text/text.js b/src-docs/src/views/text/text.js
index f39fb8fe2f0..2eefdfe65f8 100644
--- a/src-docs/src/views/text/text.js
+++ b/src-docs/src/views/text/text.js
@@ -12,6 +12,18 @@ export default () => (
Far out in the uncharted backwaters of the unfashionable end of
the western spiral arm of the Galaxy lies a small unregarded
yellow sun.
+
+ When suddenly some wild JavaScript code appeared! const whoa = "!"
+
+
+
+
+ const completelyUnexpected = "the audacity!";
+
+
+
+
+ That was close.
diff --git a/src/components/text/_text.scss b/src/components/text/_text.scss
index 3df7716145a..d67364f3725 100644
--- a/src/components/text/_text.scss
+++ b/src/components/text/_text.scss
@@ -7,7 +7,8 @@
ul,
ol,
blockquote,
- img {
+ img,
+ pre {
margin-bottom: convertToRem($baseLineHeightMultiplier * 3);
}
@@ -154,6 +155,30 @@
text-transform: uppercase;
}
+ pre {
+ height: 100%;
+ overflow: auto;
+ white-space: pre-wrap;
+ padding: $euiSize;
+ }
+
+ pre,
+ pre code {
+ display: block;
+ }
+
+ pre,
+ code {
+ background: $euiCodeBlockBackgroundColor;
+ color: $euiCodeBlockColor;
+ }
+
+ code {
+ line-height: $euiLineHeight;
+ font-family: $euiCodeFontFamily;
+ font-weight: $euiFontWeightRegular;
+ }
+
@include euiScaleText($euiFontSize);
&.euiText--small {
diff --git a/src/components/text/text.js b/src/components/text/text.js
index 7505ea7bbdf..082b1684c4f 100644
--- a/src/components/text/text.js
+++ b/src/components/text/text.js
@@ -19,7 +19,7 @@ export const EuiText = ({ size, color, children, className, ...rest }) => {
const classes = classNames(
'euiText',
textSizeToClassNameMap[size],
- className
+ className,
);
let optionallyColoredText;