This repository has been archived by the owner on Dec 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/project-openubl/xml-build…
- Loading branch information
Showing
8 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/PresentationalComponents/IframeComponent/IframeComponent.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.IframeComponent_fullheight { | ||
height: 100%; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/PresentationalComponents/IframeComponent/IframeComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from "react"; | ||
import "./IframeComponent.scss"; | ||
|
||
interface Props { | ||
title: string; | ||
src: string; | ||
height: string; | ||
width: string; | ||
} | ||
|
||
export const IframeComponent: React.FC<Props> = ({ | ||
title, | ||
src, | ||
height, | ||
width | ||
}) => { | ||
return ( | ||
<React.Fragment> | ||
<iframe | ||
title={title} | ||
src={src} | ||
height={height} | ||
width={width} | ||
className="IframeComponent_fullheight" | ||
/> | ||
</React.Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./IframeComponent"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/PresentationalComponents/PageSwaggerUI/PageSwaggerUI.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react"; | ||
import { | ||
PageSection, | ||
PageSectionVariants, | ||
TextContent, | ||
Text | ||
} from "@patternfly/react-core"; | ||
import { IframeComponent } from "../IframeComponent"; | ||
|
||
interface Props {} | ||
|
||
export const PageSwaggerUI: React.FC<Props> = () => { | ||
// This will work only when it is deployed inside xml-builder Quarkus | ||
// const origin = `http://localhost:8080/swagger-ui/`; | ||
const origin = `${window.location.origin}/swagger-ui/`; | ||
return ( | ||
<React.Fragment> | ||
<PageSection variant={PageSectionVariants.light}> | ||
<TextContent> | ||
<Text component="h1">OpenAPI v3</Text> | ||
<Text component="small"> | ||
Interactúa con todos los endpoints utilizando las herramientas que | ||
te ofrecemos. | ||
</Text> | ||
</TextContent> | ||
</PageSection> | ||
<PageSection> | ||
<IframeComponent | ||
title="Swagger UI" | ||
src={origin} | ||
height="100%" | ||
width="100%" | ||
/> | ||
</PageSection> | ||
</React.Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./PageSwaggerUI"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters