-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added Console button component to display links to AWS console (#…
- Loading branch information
1 parent
30a29e2
commit 9e0343e
Showing
18 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,31 @@ | ||
import React, { type ReactNode } from "react"; | ||
import clsx from "clsx"; | ||
|
||
import styles from "./styles.module.css"; | ||
import useBaseUrl from "@docusaurus/useBaseUrl"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons"; | ||
|
||
interface Props { | ||
service: string; | ||
url: string; | ||
label: string; | ||
} | ||
|
||
export default function ConsoleButton({ | ||
service, | ||
url = "http://localhost:3000", | ||
label = "Launch", | ||
}: Props): JSX.Element { | ||
let serviceIcon = service || "console"; | ||
return ( | ||
<a className={styles.button} href={url} target="_blank"> | ||
<img | ||
className={styles.icon} | ||
src={useBaseUrl(`/img/services/${serviceIcon}.png`)} | ||
alt="AWS console icon" | ||
/> | ||
<span className={styles.label}>{label}</span> | ||
</a> | ||
); | ||
} |
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,31 @@ | ||
.button { | ||
-webkit-appearance: button; | ||
-moz-appearance: button; | ||
appearance: button; | ||
|
||
text-decoration: none; | ||
color: initial; | ||
background-color: #f90; | ||
padding-inline: 10px; | ||
padding-block: 4px; | ||
border: 1px solid #f90; | ||
font-weight: bold; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
text-align: center; | ||
line-height: 30px; | ||
margin-bottom: 30px; | ||
color: black; | ||
} | ||
|
||
.icon { | ||
width: 25px; | ||
height: auto; | ||
margin: auto; | ||
vertical-align: middle; | ||
display: inline-block; | ||
} | ||
|
||
.label { | ||
padding-left: 10px; | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.