Skip to content

Commit b32a1be

Browse files
committed
update imports to use named exports for MessageExamples and OperationHeader
1 parent 2c7b85b commit b32a1be

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

packages/components/docs/API.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</dd>
8989
<dt>
9090
<a href="#AvailableOperations">AvailableOperations</a>
91-
⇒ <code>JSX.Element</code>
91+
⇒ <code>React.ReactNode</code>
9292
</dt>
9393
<dd>
9494
<p>Renders a list of AsyncAPI operations with their headers and message examples.</p>
@@ -109,7 +109,7 @@
109109
</dd>
110110
<dt>
111111
<a href="#MessageExamples">MessageExamples</a>
112-
⇒ <code>JSX.Element</code>
112+
⇒ <code>React.ReactNode</code>
113113
</dt>
114114
<dd>
115115
<p>Renders Message Examples of a given AsyncAPI operation.</p>
@@ -738,7 +738,7 @@ Renders a list of AsyncAPI operations with their headers and message examples.
738738

739739
### Returns
740740

741-
- **JSX.Element** - A Component containing rendered operations, or null if no operations are provided
741+
- **React.ReactNode** - A Component containing rendered operations, or null if no operations are provided
742742

743743

744744

@@ -842,7 +842,7 @@ Renders Message Examples of a given AsyncAPI operation.
842842

843843
### Returns
844844

845-
- **JSX.Element** - A Text Component that contains message examples. or null when no examples exist.
845+
- **React.ReactNode** - A Text Component that contains message examples. or null when no examples exist.
846846

847847

848848

@@ -960,7 +960,11 @@ async function renderOverview(){
960960
const serverUrl = getServerUrl(server);
961961

962962
return (
963-
<Overview info={info} title={title} serverUrl={serverUrl} />
963+
<Overview
964+
info={info}
965+
title={title}
966+
serverUrl={serverUrl}
967+
/>
964968
)
965969
}
966970
```

packages/components/src/components/readme/AvailableOperations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MessageExamples } from './MessageExamples';
66
* Renders a list of AsyncAPI operations with their headers and message examples.
77
* @param {Object} props - Component Props
88
* @param {Array.<object>} props.operations - Array of AsyncAPI Operation objects.
9-
* @returns {JSX.Element} A Component containing rendered operations, or null if no operations are provided
9+
* @returns {React.ReactNode} A Component containing rendered operations, or null if no operations are provided
1010
*
1111
* @example
1212
* import path from "path";

packages/components/src/components/readme/MessageExamples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ client.${opId}(${JSON.stringify(payload, null, 2)})
4040
*
4141
* @param {Object} props - Component Props
4242
* @param {object} props.operation - An AsyncAPI Operation object.
43-
* @returns {JSX.Element | null} A Text Component that contains message examples. or null when no examples exist.
43+
* @returns {React.ReactNode} A Text Component that contains message examples. or null when no examples exist.
4444
*
4545
* @example
4646
* import path from "path";

packages/components/src/components/readme/Overview.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ import { Text } from '@asyncapi/generator-react-sdk';
3030
* const serverUrl = getServerUrl(server);
3131
*
3232
* return (
33-
* <Overview info={info} title={title} serverUrl={serverUrl} />
33+
* <Overview
34+
* info={info}
35+
* title={title}
36+
* serverUrl={serverUrl}
37+
* />
3438
* )
3539
* }
3640
*

0 commit comments

Comments
 (0)