@redocly/theme 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/lib/components/CodeBlock/CodeBlock.d.ts +29 -1
  2. package/lib/components/CodeBlock/CodeBlock.js +56 -94
  3. package/lib/components/CodeBlock/CodeBlockContainer.d.ts +3 -0
  4. package/lib/components/CodeBlock/CodeBlockContainer.js +120 -0
  5. package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +5 -0
  6. package/lib/components/CodeBlock/CodeBlockControlButton.js +63 -0
  7. package/lib/components/CodeBlock/CodeBlockControls.d.ts +33 -0
  8. package/lib/components/CodeBlock/CodeBlockControls.js +56 -0
  9. package/lib/components/CodeBlock/index.d.ts +3 -0
  10. package/lib/components/CodeBlock/index.js +3 -0
  11. package/lib/components/CopyButton/CopyButton.d.ts +12 -3
  12. package/lib/components/CopyButton/CopyButton.js +30 -26
  13. package/lib/components/CopyButton/index.d.ts +0 -1
  14. package/lib/components/CopyButton/index.js +0 -1
  15. package/lib/components/Feedback/useReportDialog.d.ts +12 -6
  16. package/lib/components/Feedback/useReportDialog.js +13 -5
  17. package/lib/components/JsonViewer/JsonViewer.d.ts +0 -1
  18. package/lib/components/JsonViewer/JsonViewer.js +100 -119
  19. package/lib/components/Markdown/MarkdownWrapper.d.ts +5 -1
  20. package/lib/components/Markdown/MarkdownWrapper.js +59 -53
  21. package/lib/components/Menu/MobileMenu.js +2 -2
  22. package/lib/components/Menu/MobileMenuGroup.js +1 -1
  23. package/lib/components/Panel/PanelHeader.js +0 -1
  24. package/lib/components/Tooltip/Tooltip.js +2 -0
  25. package/lib/components/index.d.ts +0 -3
  26. package/lib/components/index.js +0 -3
  27. package/lib/config.d.ts +526 -24
  28. package/lib/config.js +150 -4
  29. package/lib/globalStyle.js +50 -7
  30. package/lib/icons/ArrowIcon/ArrowIcon.d.ts +3 -3
  31. package/lib/icons/ArrowIcon/ArrowIcon.js +33 -6
  32. package/lib/icons/CollapseIcon/CollapseIcon.d.ts +7 -0
  33. package/lib/icons/CollapseIcon/CollapseIcon.js +22 -0
  34. package/lib/icons/CollapseIcon/index.d.ts +1 -0
  35. package/lib/{components/SourceCode → icons/CollapseIcon}/index.js +1 -1
  36. package/lib/icons/CopyIcon/CopyIcon.d.ts +7 -0
  37. package/lib/icons/CopyIcon/CopyIcon.js +17 -0
  38. package/lib/icons/CopyIcon/index.d.ts +1 -0
  39. package/lib/{components/CodeSample → icons/CopyIcon}/index.js +1 -1
  40. package/lib/icons/DeselectIcon/DeselectIcon.d.ts +7 -0
  41. package/lib/icons/DeselectIcon/DeselectIcon.js +19 -0
  42. package/lib/icons/DeselectIcon/index.d.ts +1 -0
  43. package/lib/{components/SamplesPanelControls → icons/DeselectIcon}/index.js +1 -1
  44. package/lib/icons/ExpandIcon/ExpandIcon.d.ts +5 -6
  45. package/lib/icons/ExpandIcon/ExpandIcon.js +10 -19
  46. package/lib/icons/FileIcon/FileIcon.d.ts +7 -0
  47. package/lib/icons/FileIcon/FileIcon.js +17 -0
  48. package/lib/icons/FileIcon/index.d.ts +1 -0
  49. package/lib/icons/FileIcon/index.js +18 -0
  50. package/lib/icons/ReportIcon/ReportIcon.d.ts +7 -0
  51. package/lib/icons/ReportIcon/ReportIcon.js +19 -0
  52. package/lib/icons/ReportIcon/index.d.ts +1 -0
  53. package/lib/icons/ReportIcon/index.js +18 -0
  54. package/lib/icons/SelectIcon/SelectIcon.d.ts +7 -0
  55. package/lib/icons/SelectIcon/SelectIcon.js +19 -0
  56. package/lib/icons/SelectIcon/index.d.ts +1 -0
  57. package/lib/icons/SelectIcon/index.js +18 -0
  58. package/lib/icons/index.d.ts +7 -1
  59. package/lib/icons/index.js +7 -1
  60. package/lib/layouts/Forbidden.js +2 -2
  61. package/lib/ui/darkColors.js +4 -4
  62. package/lib/utils/highlight.d.ts +1 -0
  63. package/lib/utils/highlight.js +1 -0
  64. package/package.json +2 -2
  65. package/src/components/CodeBlock/CodeBlock.tsx +100 -0
  66. package/src/components/CodeBlock/{CodeBlock.ts → CodeBlockContainer.tsx} +23 -6
  67. package/src/components/CodeBlock/CodeBlockControlButton.tsx +38 -0
  68. package/src/components/CodeBlock/CodeBlockControls.tsx +182 -0
  69. package/src/components/CodeBlock/index.ts +3 -0
  70. package/src/components/CopyButton/CopyButton.tsx +71 -19
  71. package/src/components/CopyButton/index.ts +0 -1
  72. package/src/components/Feedback/useReportDialog.ts +24 -14
  73. package/src/components/JsonViewer/JsonViewer.tsx +112 -142
  74. package/src/components/Markdown/MarkdownWrapper.tsx +65 -54
  75. package/src/components/Menu/MobileMenu.tsx +3 -3
  76. package/src/components/Menu/MobileMenuGroup.tsx +4 -2
  77. package/src/components/Panel/PanelHeader.ts +0 -1
  78. package/src/components/Tooltip/Tooltip.tsx +2 -0
  79. package/src/components/index.ts +0 -3
  80. package/src/config.ts +168 -8
  81. package/src/globalStyle.ts +50 -7
  82. package/src/icons/ArrowIcon/ArrowIcon.tsx +37 -14
  83. package/src/icons/CollapseIcon/CollapseIcon.tsx +40 -0
  84. package/src/icons/CollapseIcon/index.tsx +1 -0
  85. package/src/icons/CopyIcon/CopyIcon.tsx +26 -0
  86. package/src/icons/CopyIcon/index.ts +1 -0
  87. package/src/icons/DeselectIcon/DeselectIcon.tsx +28 -0
  88. package/src/icons/DeselectIcon/index.ts +1 -0
  89. package/src/icons/ExpandIcon/ExpandIcon.tsx +28 -34
  90. package/src/icons/FileIcon/FileIcon.tsx +29 -0
  91. package/src/icons/FileIcon/index.ts +1 -0
  92. package/src/icons/ReportIcon/ReportIcon.tsx +36 -0
  93. package/src/icons/ReportIcon/index.ts +1 -0
  94. package/src/icons/SelectIcon/SelectIcon.tsx +31 -0
  95. package/src/icons/SelectIcon/index.ts +1 -0
  96. package/src/icons/index.ts +7 -1
  97. package/src/layouts/Forbidden.tsx +1 -1
  98. package/src/ui/darkColors.tsx +4 -4
  99. package/src/utils/highlight.ts +1 -0
  100. package/lib/components/CodeSample/CodeSample.d.ts +0 -10
  101. package/lib/components/CodeSample/CodeSample.js +0 -226
  102. package/lib/components/CodeSample/index.d.ts +0 -1
  103. package/lib/components/CopyButton/CopyButtonWrapper.d.ts +0 -11
  104. package/lib/components/CopyButton/CopyButtonWrapper.js +0 -53
  105. package/lib/components/SamplesPanelControls/SamplesPanelControls.d.ts +0 -4
  106. package/lib/components/SamplesPanelControls/SamplesPanelControls.js +0 -76
  107. package/lib/components/SamplesPanelControls/index.d.ts +0 -1
  108. package/lib/components/SourceCode/SourceCode.d.ts +0 -33
  109. package/lib/components/SourceCode/SourceCode.js +0 -60
  110. package/lib/components/SourceCode/index.d.ts +0 -1
  111. package/src/components/CodeSample/CodeSample.tsx +0 -257
  112. package/src/components/CodeSample/index.ts +0 -1
  113. package/src/components/CopyButton/CopyButtonWrapper.tsx +0 -55
  114. package/src/components/SamplesPanelControls/SamplesPanelControls.ts +0 -76
  115. package/src/components/SamplesPanelControls/index.ts +0 -1
  116. package/src/components/SourceCode/SourceCode.tsx +0 -128
  117. package/src/components/SourceCode/index.ts +0 -1
@@ -1,257 +0,0 @@
1
- import React, { useState } from 'react';
2
- import styled, { css } from 'styled-components';
3
-
4
- import { ClipboardService } from '@theme/utils/ClipboardService';
5
- import { useThemeConfig } from '@theme/hooks/useThemeConfig';
6
- import { ReportDialog, useReportDialog } from '@theme/components/Feedback';
7
- import { useTranslate } from '@portal/hooks';
8
- import { concatClassNames } from '@theme/utils';
9
-
10
- export type CodeSampleProps = {
11
- language: string;
12
- highlighted: string;
13
- rawContent: string;
14
- 'data-source'?: string;
15
- 'data-hash'?: string;
16
- className?: string;
17
- };
18
-
19
- export function CodeSample({
20
- rawContent,
21
- highlighted,
22
- language,
23
- 'data-source': dataSource,
24
- 'data-hash': dataHash,
25
- className = '',
26
- }: CodeSampleProps): JSX.Element {
27
- const langClassName = language ? `language-${language}` : '';
28
- const { codeSnippet: { copy = {}, report = {} } = {} } = useThemeConfig();
29
-
30
- const [isCopied, setIsCopied] = useState(false);
31
- const { isReportDialogShown, isReportButtonShown, reportButtonProps, reportDialogProps } =
32
- useReportDialog(report);
33
-
34
- const { translate } = useTranslate();
35
- const translationKeys = {
36
- buttonText: 'theme.codeSnippet.copy.buttonText',
37
- tooltipText: 'theme.codeSnippet.copy.tooltipText',
38
- toasterText: 'theme.codeSnippet.copy.toasterText',
39
- reportTitle: 'theme.codeSnippet.report.title',
40
- };
41
-
42
- const copyCode = (code: string) => {
43
- ClipboardService.copyCustom(code);
44
- setIsCopied(true);
45
- setTimeout(() => setIsCopied(false), copy.toasterDuration || 1500);
46
- };
47
-
48
- return (
49
- <Wrapper
50
- className={concatClassNames('code-sample', className)}
51
- data-component-name="Markdown/CodeSample/CodeSample"
52
- data-source={dataSource}
53
- data-hash={dataHash}
54
- >
55
- <CodeSampleButtonContainer>
56
- {!copy.hide && (
57
- <>
58
- {!isCopied && (
59
- <Button
60
- onClick={() => copyCode(rawContent)}
61
- title={translate(
62
- translationKeys.tooltipText,
63
- copy.tooltipText || 'Copy to clipboard',
64
- )}
65
- >
66
- {translate(translationKeys.buttonText, copy.buttonText || 'Copy')}
67
- </Button>
68
- )}
69
- {isCopied && (
70
- <DoneIndicator>
71
- {translate(translationKeys.toasterText, copy.toasterText || 'Copied!')}
72
- </DoneIndicator>
73
- )}
74
- </>
75
- )}
76
-
77
- {isReportButtonShown && (
78
- <Button {...reportButtonProps}>{translate(translationKeys.reportTitle, 'Report')}</Button>
79
- )}
80
-
81
- {isReportDialogShown && <ReportDialog {...reportDialogProps} location={rawContent} />}
82
- </CodeSampleButtonContainer>
83
- <pre className={langClassName}>
84
- <code className={langClassName} dangerouslySetInnerHTML={{ __html: highlighted }} />
85
- </pre>
86
- </Wrapper>
87
- );
88
- }
89
-
90
- const CodeSampleButtonContainer = styled.div`
91
- display: flex;
92
- position: absolute;
93
- top: 12px;
94
- right: 5px;
95
- `;
96
-
97
- const Button = styled.div`
98
- padding: var(--code-block-controls-padding);
99
- border-radius: var(--code-block-controls-border-radius);
100
- font-size: var(--code-block-controls-font-size);
101
- font-family: var(--code-block-controls-font-family);
102
- &:hover {
103
- cursor: pointer;
104
- }
105
-
106
- @media print {
107
- display: none;
108
- }
109
- `;
110
-
111
- const DoneIndicator = styled.div`
112
- padding: var(--code-block-controls-padding);
113
- border-radius: var(--code-block-controls-border-radius);
114
- font-size: var(--code-block-controls-font-size);
115
- font-family: var(--code-block-controls-font-family);
116
- cursor: default;
117
- `;
118
-
119
- const darkStyleTokens = css`
120
- .token.comment,
121
- .token.prolog,
122
- .token.doctype,
123
- .token.cdata {
124
- color: hsl(30, 20%, 50%);
125
- }
126
- .token.property,
127
- .token.tag,
128
- .token.number,
129
- .token.constant,
130
- .token.symbol {
131
- color: #62bff9;
132
- }
133
- .token.boolean {
134
- color: firebrick;
135
- }
136
- .token.selector,
137
- .token.attr-name,
138
- .token.string,
139
- .token.char,
140
- .token.builtin,
141
- .token.inserted {
142
- color: #a0fbaa;
143
- & + a,
144
- & + a:visited {
145
- color: #4ed2ba;
146
- text-decoration: underline;
147
- }
148
- }
149
- .token.operator,
150
- .token.entity,
151
- .token.url,
152
- .token.variable {
153
- color: hsl(40, 90%, 60%);
154
- }
155
- .token.atrule,
156
- .token.attr-value,
157
- .token.keyword {
158
- color: hsl(350, 40%, 70%);
159
- }
160
- .token.regex,
161
- .token.important {
162
- color: #e90;
163
- }
164
- .token.deleted {
165
- color: red;
166
- }
167
- `;
168
-
169
- const Wrapper = styled.div`
170
- overflow: auto;
171
- border-radius: 4px;
172
- position: relative;
173
-
174
- ${Button},
175
- ${DoneIndicator} {
176
- color: var(--code-block-controls-text-color);
177
- background-color: var(--code-block-controls-background-color);
178
- opacity: var(--code-block-controls-opacity);
179
- }
180
- ${Button}:hover {
181
- color: var(--code-block-controls-hover-text-color);
182
- background-color: var(--code-block-controls-hover-background-color);
183
- opacity: var(--code-block-controls-active-opacity);
184
- }
185
-
186
- pre {
187
- white-space: var(--code-wrap);
188
- color: white;
189
- padding: 12px 14px 15px 14px;
190
- overflow-x: auto;
191
- line-height: normal;
192
- border-radius: var(--code-block-border-radius);
193
- font-family: var(--code-font-family);
194
- background-color: var(--code-block-background-color);
195
-
196
- print-color-adjust: exact;
197
- -webkit-print-color-adjust: exact;
198
-
199
- code {
200
- background-color: transparent;
201
- border: 0;
202
- padding: 0;
203
- color: var(--code-block-text-color);
204
- &:before,
205
- &:after {
206
- content: none;
207
- }
208
- }
209
- }
210
- pre[class*='language-'] {
211
- padding: 1em;
212
- margin: 0.5em 0;
213
- overflow: auto;
214
- border: 0;
215
- border-radius: var(--border-radius);
216
- }
217
- code[class='language-text'] {
218
- line-height: 1.2em;
219
- display: inline-flex;
220
- white-space: pre-wrap;
221
- overflow-wrap: anywhere;
222
- }
223
- code[class*='language-'],
224
- pre[class*='language-'] {
225
- text-align: left;
226
- white-space: pre;
227
- word-spacing: normal;
228
- word-break: normal;
229
- word-wrap: normal;
230
- line-height: 1.5;
231
- -moz-tab-size: 4;
232
- -o-tab-size: 4;
233
- tab-size: 4;
234
- -webkit-hyphens: none;
235
- -moz-hyphens: none;
236
- -ms-hyphens: none;
237
- hyphens: none;
238
- .token.important,
239
- .token.bold {
240
- font-weight: bold;
241
- }
242
- .token.italic {
243
- font-style: italic;
244
- }
245
- .token.entity {
246
- cursor: help;
247
- }
248
- .token.punctuation {
249
- opacity: 0.7;
250
- }
251
- .namespace {
252
- opacity: 0.7;
253
- }
254
-
255
- ${darkStyleTokens};
256
- }
257
- `;
@@ -1 +0,0 @@
1
- export * from '@theme/components/CodeSample/CodeSample';
@@ -1,55 +0,0 @@
1
- import React, { memo } from 'react';
2
-
3
- import { SamplesControlButton } from '@theme/components/SamplesPanelControls';
4
- import { Tooltip } from '@theme/components/Tooltip';
5
- import { useControl } from '@theme/hooks';
6
- import { ClipboardService } from '@theme/utils';
7
- import type { TooltipProps } from '@theme/components/Tooltip';
8
-
9
- export interface CopyButtonWrapperProps {
10
- data: unknown;
11
- children: (props: {
12
- renderCopyButton: (placement?: TooltipProps['placement']) => JSX.Element;
13
- }) => JSX.Element;
14
- onCopyClick?: () => void;
15
- dataTestId?: string;
16
- }
17
-
18
- function CopyButtonWrapperComponent({
19
- data,
20
- children,
21
- onCopyClick,
22
- dataTestId = 'copy-button',
23
- }: CopyButtonWrapperProps): JSX.Element {
24
- const tooltip = useControl();
25
-
26
- const showTooltip = (): void => {
27
- tooltip.handleOpen();
28
-
29
- setTimeout(() => {
30
- tooltip.handleClose();
31
- }, 1500);
32
- };
33
-
34
- const copy = (): void => {
35
- const content = typeof data === 'string' ? data : JSON.stringify(data, null, 2);
36
- ClipboardService.copyCustom(content);
37
- showTooltip();
38
-
39
- onCopyClick?.();
40
- };
41
-
42
- const renderCopyButton = (placement: TooltipProps['placement'] = 'top'): JSX.Element => {
43
- return (
44
- <Tooltip className="copy-button" tip="Copied" isOpen={tooltip.isOpened} placement={placement}>
45
- <SamplesControlButton onClick={copy} data-cy={dataTestId}>
46
- Copy
47
- </SamplesControlButton>
48
- </Tooltip>
49
- );
50
- };
51
-
52
- return children({ renderCopyButton });
53
- }
54
-
55
- export const CopyButtonWrapper = memo<CopyButtonWrapperProps>(CopyButtonWrapperComponent);
@@ -1,76 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- import { CodeBlock } from '@theme/components/CodeBlock';
4
-
5
- export const SamplesControlButton = styled.button.attrs<{ className?: string }>(
6
- ({ className }) => ({
7
- 'data-component-name': 'SamplesPanelControls/SamplesPanelControls',
8
- className: className,
9
- }),
10
- )`
11
- background-color: var(--panel-samples-controls-background-color);
12
- border: 0;
13
- outline: 0;
14
- border-radius: var(--border-radius);
15
- height: 20px;
16
- color: var(--panel-samples-controls-text-color);
17
- font-size: 12px;
18
- line-height: 12px;
19
- cursor: pointer;
20
- padding: 1px 6px;
21
- min-width: 90px;
22
-
23
- ${({ theme }) => theme.mediaQueries?.small} {
24
- padding: 2px 20px;
25
- }
26
-
27
- :hover,
28
- :focus {
29
- background-color: var(--panel-samples-controls-hover-background-color);
30
- }
31
- `;
32
-
33
- export const SampleControls = styled.div`
34
- padding: 10px 0;
35
- opacity: 0.7;
36
- transition: opacity 0.3s ease;
37
- text-align: right;
38
-
39
- &:focus-within {
40
- opacity: 1;
41
- }
42
-
43
- > div,
44
- > ${SamplesControlButton} {
45
- /* can have tooltip wrapper div also */
46
- margin-top: 5px;
47
- margin-left: 10px;
48
-
49
- ${({ theme }) => theme.mediaQueries?.small} {
50
- margin-top: 0;
51
- }
52
-
53
- &:first-child {
54
- margin-left: 0;
55
- }
56
- }
57
- `;
58
-
59
- export const SampleControlsWrap = styled.div`
60
- &:hover ${SampleControls} {
61
- opacity: 1;
62
- }
63
- `;
64
-
65
- export const PreformattedCodeBlock = styled(CodeBlock.withComponent('pre'))`
66
- overflow-x: auto;
67
- margin: 0;
68
- max-height: var(--code-block-max-height);
69
- font-family: var(--code-font-family);
70
- padding: 20px;
71
- border-radius: var(--border-radius);
72
- background-color: var(--panel-samples-controls-background-color);
73
- color: var(--text-color-inverse);
74
- font-size: var(--code-font-size);
75
- white-space: var(--code-wrap, pre);
76
- `;
@@ -1 +0,0 @@
1
- export * from '@theme/components/SamplesPanelControls/SamplesPanelControls';
@@ -1,128 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
-
3
- import { highlight, addLineNumbers } from '@theme/utils';
4
- import {
5
- SampleControls,
6
- SampleControlsWrap,
7
- PreformattedCodeBlock,
8
- } from '@theme/components/SamplesPanelControls';
9
- import { CopyButtonWrapper } from '@theme/components/CopyButton';
10
-
11
- interface CommonCodeProps {
12
- withLineNumbers?: boolean;
13
- startLineNumber?: number;
14
- className?: string;
15
- }
16
-
17
- export interface SourceCodeProps extends CommonCodeProps {
18
- lang: string;
19
- source?: string;
20
- externalSource?: ExternalSource;
21
- onCopyClick?: () => void;
22
- withCopyButton?: boolean;
23
- dataTestId?: string;
24
- }
25
-
26
- interface CodeProps
27
- extends Required<Pick<SourceCodeProps, 'lang' | 'source' | 'dataTestId'>>,
28
- CommonCodeProps {}
29
-
30
- export interface Sample {
31
- lang: string;
32
- label?: string;
33
- }
34
-
35
- export type UnstableExternalCodeSample = Sample & {
36
- get: (source: ExternalSource) => string;
37
- };
38
-
39
- export interface ExternalSource {
40
- sample: UnstableExternalCodeSample;
41
- exampleName?: string;
42
- pathParams?: any;
43
- properties?: any;
44
- operation?: any;
45
- }
46
-
47
- export function Code({
48
- source,
49
- lang,
50
- dataTestId,
51
- withLineNumbers,
52
- startLineNumber,
53
- className,
54
- }: CodeProps): JSX.Element {
55
- const highlightedCode = highlight(source, lang);
56
-
57
- return (
58
- <PreformattedCodeBlock
59
- className={className}
60
- dangerouslySetInnerHTML={{
61
- __html: withLineNumbers
62
- ? addLineNumbers(highlightedCode, startLineNumber)
63
- : highlightedCode,
64
- }}
65
- data-cy={dataTestId}
66
- />
67
- );
68
- }
69
-
70
- export function SourceCode({
71
- lang,
72
- source,
73
- externalSource,
74
- onCopyClick,
75
- withCopyButton,
76
- dataTestId = 'source-code',
77
- withLineNumbers,
78
- startLineNumber,
79
- className,
80
- }: SourceCodeProps): JSX.Element {
81
- const [sourceCode, setSourceCode] = useState<string>(source ?? '');
82
-
83
- // The same initial value should be returned for ssr and frontend to avoid issues
84
- // Because we don't have session storage in ssr and can't get the security details there
85
- // Issue for more details https://github.com/Redocly/reference-docs/issues/888
86
- useEffect(() => {
87
- const _source = source || externalSource?.sample?.get?.(externalSource);
88
- if (_source) {
89
- setSourceCode(_source);
90
- }
91
- }, [source, externalSource]);
92
-
93
- if (withCopyButton) {
94
- return (
95
- <CopyButtonWrapper
96
- data={sourceCode}
97
- onCopyClick={onCopyClick}
98
- data-component-name="SourceCode/SourceCode"
99
- >
100
- {({ renderCopyButton }) => (
101
- <SampleControlsWrap>
102
- <SampleControls data-cy="copy-button">{renderCopyButton()}</SampleControls>
103
- <Code
104
- lang={lang}
105
- source={sourceCode}
106
- withLineNumbers={withLineNumbers}
107
- startLineNumber={startLineNumber}
108
- dataTestId={dataTestId}
109
- className={className}
110
- />
111
- </SampleControlsWrap>
112
- )}
113
- </CopyButtonWrapper>
114
- );
115
- }
116
-
117
- return (
118
- <Code
119
- dataTestId={dataTestId}
120
- className={className}
121
- lang={lang}
122
- source={sourceCode}
123
- withLineNumbers={withLineNumbers}
124
- startLineNumber={startLineNumber}
125
- data-component-name="SourceCode/SourceCode"
126
- />
127
- );
128
- }
@@ -1 +0,0 @@
1
- export * from '@theme/components/SourceCode/SourceCode';