Skip to content

Commit bb9ccf8

Browse files
committed
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
1 parent b5dfab1 commit bb9ccf8

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

packages/shared-ux/markdown/impl/markdown.tsx

+12-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
* Side Public License, v 1.
77
*/
88

9-
import { EuiLink, EuiMarkdownEditor, EuiMarkdownEditorProps, EuiMarkdownFormat, getDefaultEuiMarkdownProcessingPlugins } from '@elastic/eui';
9+
import {
10+
EuiLink,
11+
EuiMarkdownEditor,
12+
EuiMarkdownEditorProps,
13+
EuiMarkdownFormat,
14+
getDefaultEuiMarkdownProcessingPlugins,
15+
} from '@elastic/eui';
1016
import React, { useState } from 'react';
1117

1218
export type MarkdownProps = Partial<
@@ -41,17 +47,18 @@ export const Markdown = ({
4147

4248
// openLinksInNewTab functionality from https://codesandbox.io/s/relaxed-yalow-hy69r4?file=/demo.js:482-645
4349
const processingPlugins = getDefaultEuiMarkdownProcessingPlugins();
44-
processingPlugins[1][1].components.a = (props) => (
45-
<EuiLink {...props} target="_blank" />
46-
);
50+
processingPlugins[1][1].components.a = (props) => <EuiLink {...props} target="_blank" />;
4751

4852
// Render EuiMarkdownFormat when readOnly set to true
4953
if (readOnly) {
5054
if (!children && !markdownContent) {
5155
throw new Error('Markdown content is required in [readOnly] mode');
5256
}
5357
return (
54-
<EuiMarkdownFormat aria-label={ariaLabelContent ?? 'markdown component'} processingPluginList={openLinksInNewTab ? processingPlugins : undefined}>
58+
<EuiMarkdownFormat
59+
aria-label={ariaLabelContent ?? 'markdown component'}
60+
processingPluginList={openLinksInNewTab ? processingPlugins : undefined}
61+
>
5562
{children ?? markdownContent!}
5663
</EuiMarkdownFormat>
5764
);

packages/shared-ux/markdown/impl/markdown_format.stories.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ export const MarkdownStoryComponent = (params: MarkdownStorybookParams) => {
3232
<EuiFlexGroup>
3333
<EuiFlexItem>
3434
<Markdown
35-
{...params}
35+
{...params}
3636
readOnly={true}
3737
markdownContent={'My content in **markdown** format set as the *markdownContent prop*'}
3838
/>
3939
<Markdown {...params} readOnly={true}>
40-
{'My content in **markdown** format passed as *children* [test link to open in new tab or not](https://www.elastic.co)'}
40+
{
41+
'My content in **markdown** format passed as *children* [test link to open in new tab or not](https://www.elastic.co)'
42+
}
4143
</Markdown>
4244
</EuiFlexItem>
4345
</EuiFlexGroup>

packages/shared-ux/markdown/mocks/storybook.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ import type { MarkdownProps } from '@kbn/shared-ux-markdown-types';
1111

1212
type PropArguments = Pick<
1313
MarkdownProps,
14-
'readOnly' | 'placeholder' | 'markdownContent' | 'height' | 'ariaLabelContent' | 'openLinksInNewTab'
14+
| 'readOnly'
15+
| 'placeholder'
16+
| 'markdownContent'
17+
| 'height'
18+
| 'ariaLabelContent'
19+
| 'openLinksInNewTab'
1520
>;
1621

1722
export type Params = Record<keyof PropArguments, any>;

0 commit comments

Comments
 (0)