-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking change: renaming GithubBanner to GithubCard
- Loading branch information
1 parent
7c5769a
commit 60d7b1a
Showing
19 changed files
with
317 additions
and
68 deletions.
There are no files selected for viewing
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 @@ | ||
.version { | ||
background: rgba(0, 164, 186, 0.15); | ||
border-radius: 4px; | ||
padding: 3px 8px; | ||
gap: 4px; | ||
font-weight: 500; | ||
letter-spacing: 0.1px; | ||
font-weight: 600; | ||
font-size: 10px; | ||
line-height: 140%; | ||
color: #00a4ba; | ||
margin-right: 8px; | ||
} | ||
|
||
.metadata { | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
.metadata p { | ||
margin-right: 18px; | ||
font-size: 12px; | ||
line-height: 146%; | ||
font-weight: 500; | ||
} | ||
|
||
.container { | ||
display: flex !important; | ||
} |
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 |
---|---|---|
|
@@ -12,6 +12,10 @@ | |
line-height: 24px; | ||
} | ||
|
||
.button:hover { | ||
cursor: pointer; | ||
} | ||
|
||
.button svg { | ||
margin-right: 9px; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
import React, { PropsWithChildren } from "react"; | ||
import clsx from "clsx"; | ||
import React, { | ||
DetailedHTMLProps, | ||
HtmlHTMLAttributes, | ||
PropsWithChildren, | ||
} from "react"; | ||
|
||
import styles from "./Card.module.css"; | ||
|
||
export const Card = ({ children }: PropsWithChildren) => ( | ||
<div className={styles.container}>{children}</div> | ||
export const Card = ({ | ||
children, | ||
className, | ||
...otherProps | ||
}: PropsWithChildren< | ||
DetailedHTMLProps<HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> | ||
>) => ( | ||
<div {...otherProps} className={clsx([className, styles.container])}> | ||
{children} | ||
</div> | ||
); |
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,60 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
import styles from "./SdkCard.module.css"; | ||
import { Card } from "../shared/Card"; | ||
|
||
import Package from "@site/static/img/sdk-card/package.svg"; | ||
import Android from "@site/static/img/sdk-card/android.svg"; | ||
import DotNet from "@site/static/img/sdk-card/dotNet.svg"; | ||
import Go from "@site/static/img/sdk-card/go.svg"; | ||
import Ios from "@site/static/img/sdk-card/ios.svg"; | ||
import Node from "@site/static/img/sdk-card/node.svg"; | ||
import Python from "@site/static/img/sdk-card/python.svg"; | ||
import ReactSvg from "@site/static/img/sdk-card/react.svg"; | ||
import Terraform from "@site/static/img/sdk-card/terraform.svg"; | ||
import clsx from "clsx"; | ||
|
||
interface SdkCard { | ||
title: string; | ||
repository: string; | ||
metadata?: ReactNode; | ||
cta?: ReactNode; | ||
className: string; | ||
} | ||
|
||
export const SdkCard = ({ | ||
title, | ||
repository, | ||
metadata, | ||
cta, | ||
className, | ||
}: SdkCard) => { | ||
const Icon = { | ||
".NET SDK": DotNet, | ||
"Go SDK": Go, | ||
"Python SDK": Python, | ||
"Terraform SDK": Terraform, | ||
"Node.js SDK": Node, | ||
"React SDK": ReactSvg, | ||
"Android SDK": Android, | ||
"iOS SDK": Ios, | ||
}[title]; | ||
|
||
return ( | ||
<Card className={clsx([className, styles.container])}> | ||
<div className={styles.icon}> | ||
<Icon /> | ||
</div> | ||
<div className={styles.content}> | ||
<h3>{title}</h3> | ||
<div className={styles.repository}> | ||
<p> | ||
<Package /> {repository} | ||
</p> | ||
</div> | ||
{metadata && <div className={styles.metadata}>{metadata}</div>} | ||
</div> | ||
{cta && <div>{cta}</div>} | ||
</Card> | ||
); | ||
}; |
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.