Skip to content

Commit

Permalink
Merge branch 'master' into issue-907-sidebar-broken
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator authored Nov 4, 2024
2 parents 837bc81 + bd54fb2 commit 221bd5b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/react-component",
"version": "2.3.4",
"version": "2.4.2",
"private": false,
"description": "A React component for AsyncAPI specification.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library/src/containers/AsyncApi/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const AsyncApiLayout: React.FunctionComponent<Props> = ({
}

const possibleClassName =
width <= 1280 ? 'container:xl' : 'container:base';
width <= 1536 ? 'container:xl' : 'container:base';
if (possibleClassName !== observerClassName) {
setObserverClassName(possibleClassName);
}
Expand Down
1 change: 1 addition & 0 deletions library/src/containers/Info/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const Info: React.FunctionComponent = () => {
<Href
className="border border-solid border-orange-300 hover:bg-orange-300 hover:text-orange-600 text-orange-500 font-bold no-underline text-xs uppercase rounded px-3 py-1"
href={externalDocs.url()}
title={externalDocs.description() ?? undefined}
>
<span>{EXTERAL_DOCUMENTATION_TEXT}</span>
</Href>
Expand Down
4 changes: 2 additions & 2 deletions library/src/containers/Operations/Operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const Operation: React.FunctionComponent<Props> = (props) => {
{servers.map((server) => (
<li className="inline-block mt-2 mr-2" key={server.id()}>
<a
href={`#${CommonHelpers.getIdentifier(
href={`${window.location.pathname}#${CommonHelpers.getIdentifier(
'server-' + server.id(),
config,
)}`}
Expand Down Expand Up @@ -406,7 +406,7 @@ export const OperationReplyChannelInfo: React.FunctionComponent<Props> = ({
{servers.map((server) => (
<li className="inline-block mt-2 mr-2" key={server.id()}>
<a
href={`#${CommonHelpers.getIdentifier(
href={`${window.location.pathname}#${CommonHelpers.getIdentifier(
'server-' + server.id(),
config,
)}`}
Expand Down
8 changes: 7 additions & 1 deletion library/src/containers/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,13 @@ const OperationItem: React.FunctionComponent<OperationItemProps> = ({
config,
isAsyncAPIv2,
});
const bgColors = ['bg-red-600', 'bg-orange-600', 'bg-green-600'];
const bgColors = [
'bg-red-600',
'bg-orange-600',
'bg-green-600',
'bg-blue-600',
];

return (
<li key={`menu-operation-list-${operationHrefId}`}>
<a
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions web-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/web-component",
"version": "2.3.4",
"version": "2.4.2",
"private": false,
"description": "A web component for AsyncAPI specification. Based on @asyncapi/react-component.",
"repository": {
Expand Down Expand Up @@ -44,7 +44,7 @@
"install:reactcomp": "chmod +x ./bump-react-comp.sh && ./bump-react-comp.sh"
},
"dependencies": {
"@asyncapi/react-component": "^2.3.4",
"@asyncapi/react-component": "^2.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-react-components": "^1.4.2"
Expand Down

0 comments on commit 221bd5b

Please sign in to comment.