diff --git a/CHANGELOG.md b/CHANGELOG.md index fadf630d5383..5d0a9bab407f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,6 @@ - Added alpha channel (opacity) support to `EuiColorPicker` and `EuiColorStops` ([#2850](https://github.com/elastic/eui/pull/2850)) - Added `useResizeObserver` hook ([#2991](https://github.com/elastic/eui/pull/2991)) - Added `showColumnSelector.allowHide` and `showColumnSelector.allowReorder` props to `EuiDataGrid` UI configuration ([#2993](https://github.com/elastic/eui/pull/2993)) -- Added `EuiMark` component ([#3060](https://github.com/elastic/eui/pull/3060)) **Bug Fixes** diff --git a/src-docs/src/routes.js b/src-docs/src/routes.js index 6f008e81fe7a..41a0c6088b65 100644 --- a/src-docs/src/routes.js +++ b/src-docs/src/routes.js @@ -118,7 +118,7 @@ import { HeaderExample } from './views/header/header_example'; import { HealthExample } from './views/health/health_example'; -import { HighlightAndMarkExample } from './views/highlight_and_mark/highlight_and_mark_example'; +import { HighlightExample } from './views/highlight/highlight_example'; import { HorizontalRuleExample } from './views/horizontal_rule/horizontal_rule_example'; @@ -413,7 +413,7 @@ const navigation = [ DelayRenderExample, ErrorBoundaryExample, FocusTrapExample, - HighlightAndMarkExample, + HighlightExample, InnerTextExample, I18nExample, IsColorDarkExample, diff --git a/src-docs/src/views/highlight_and_mark/highlight.js b/src-docs/src/views/highlight/highlight.js similarity index 100% rename from src-docs/src/views/highlight_and_mark/highlight.js rename to src-docs/src/views/highlight/highlight.js diff --git a/src-docs/src/views/highlight_and_mark/highlight_and_mark_example.js b/src-docs/src/views/highlight/highlight_example.js similarity index 53% rename from src-docs/src/views/highlight_and_mark/highlight_and_mark_example.js rename to src-docs/src/views/highlight/highlight_example.js index d61fe836b146..87ebc10f4c72 100644 --- a/src-docs/src/views/highlight_and_mark/highlight_and_mark_example.js +++ b/src-docs/src/views/highlight/highlight_example.js @@ -4,19 +4,14 @@ import { renderToHtml } from '../../services'; import { GuideSectionTypes } from '../../components'; -import { EuiCode, EuiHighlight, EuiMark } from '../../../../src/components'; +import { EuiCode, EuiHighlight } from '../../../../src/components'; import { Highlight } from './highlight'; -import { Mark } from './mark'; - const highlightSource = require('!!raw-loader!./highlight'); const highlightHtml = renderToHtml(Highlight); -const markSource = require('!!raw-loader!./mark'); -const markHtml = renderToHtml(Mark); - -export const HighlightAndMarkExample = { - title: 'Highlight and mark', +export const HighlightExample = { + title: 'Highlight', sections: [ { title: 'Highlight', @@ -40,26 +35,5 @@ export const HighlightAndMarkExample = { components: { EuiHighlight }, demo: , }, - { - title: 'Mark', - source: [ - { - type: GuideSectionTypes.JS, - code: markSource, - }, - { - type: GuideSectionTypes.HTML, - code: markHtml, - }, - ], - text: ( -

- Use EuiMark to wrap a string in an - mark element. -

- ), - components: { EuiMark }, - demo: , - }, ], }; diff --git a/src-docs/src/views/highlight_and_mark/mark.js b/src-docs/src/views/highlight_and_mark/mark.js deleted file mode 100644 index 2b94e8604225..000000000000 --- a/src-docs/src/views/highlight_and_mark/mark.js +++ /dev/null @@ -1,13 +0,0 @@ -import React, { Fragment } from 'react'; - -import { EuiMark } from '../../../../src/components'; - -export function Mark() { - return ( - - The quick brown fox - jumped over - the lazy dog - - ); -} diff --git a/src/components/index.js b/src/components/index.js index 71e2cced4089..fab472fa1f15 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -186,8 +186,6 @@ export { EuiLink } from './link'; export { EuiListGroup, EuiListGroupItem } from './list_group'; -export { EuiMark } from './mark'; - export { EUI_MODAL_CANCEL_BUTTON, EUI_MODAL_CONFIRM_BUTTON, diff --git a/src/components/index.scss b/src/components/index.scss index cc4f1615102c..57f885deb08f 100644 --- a/src/components/index.scss +++ b/src/components/index.scss @@ -39,7 +39,6 @@ @import 'link/index'; @import 'list_group/index'; @import 'loading/index'; -@import 'mark/index'; @import 'modal/index'; @import 'nav_drawer/index'; @import 'overlay_mask/index'; diff --git a/src/components/mark/__snapshots__/mark.test.tsx.snap b/src/components/mark/__snapshots__/mark.test.tsx.snap deleted file mode 100644 index 4c160bb08bec..000000000000 --- a/src/components/mark/__snapshots__/mark.test.tsx.snap +++ /dev/null @@ -1,9 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`EuiMark is rendered 1`] = ` - - Marked - -`; diff --git a/src/components/mark/_index.scss b/src/components/mark/_index.scss deleted file mode 100644 index 4888bf861b63..000000000000 --- a/src/components/mark/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'mark'; \ No newline at end of file diff --git a/src/components/mark/_mark.scss b/src/components/mark/_mark.scss deleted file mode 100644 index db48c830c0df..000000000000 --- a/src/components/mark/_mark.scss +++ /dev/null @@ -1,4 +0,0 @@ -.euiMark { - margin: $euiSizeXS; - padding: $euiSizeXS; -} \ No newline at end of file diff --git a/src/components/mark/index.ts b/src/components/mark/index.ts deleted file mode 100644 index 24ad3219c0ab..000000000000 --- a/src/components/mark/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { EuiMark } from './mark'; diff --git a/src/components/mark/mark.test.tsx b/src/components/mark/mark.test.tsx deleted file mode 100644 index 1db9382e18c3..000000000000 --- a/src/components/mark/mark.test.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { render } from 'enzyme'; - -import { EuiMark } from './mark'; - -describe('EuiMark', () => { - test('is rendered', () => { - const component = render(Marked); - - expect(component).toMatchSnapshot(); - }); -}); diff --git a/src/components/mark/mark.tsx b/src/components/mark/mark.tsx deleted file mode 100644 index 6a1e2c9ce9d9..000000000000 --- a/src/components/mark/mark.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React, { HTMLAttributes, FunctionComponent } from 'react'; -import { CommonProps } from '../common'; -import classNames from 'classnames'; -export type EuiMarkProps = HTMLAttributes & - CommonProps & { - children: string; - }; - -export const EuiMark: FunctionComponent = ({ - children, - className, - ...rest -}) => { - const classes = classNames('euiMark', className); - - return ( - - {children} - - ); -};