-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENG-1818] Market Konfig SDKs (#671)
* make company optional in sdk signup * SdkSignupForm on /sdk
- Loading branch information
dphuang2
authored
Apr 1, 2024
1 parent
cee4d1f
commit 3cfe389
Showing
4 changed files
with
96 additions
and
11 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
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,78 @@ | ||
import { IconPencil } from "@tabler/icons-react"; | ||
import { useSdkSignup } from "../util/use-sdk-signup"; | ||
import { LoadingIcon } from "./LoadingIcon"; | ||
import clsx from "clsx"; | ||
|
||
export function SdkSignupForm({ | ||
doNotShowQuestion, | ||
}: { | ||
doNotShowQuestion?: boolean; | ||
}) { | ||
const { setEmail, signedUp, signedUpEmail, loading, handleSubmit, email } = | ||
useSdkSignup({}); | ||
|
||
return ( | ||
<form | ||
onSubmit={handleSubmit} | ||
id="signup" | ||
className="py-4 px-8 rounded-md bg-blue-100 ring-1 transition-all hover:scale-[1.01] hover:shadow-lg shadow-md my-8" | ||
> | ||
<div className="flex flex-col"> | ||
{((!signedUp && !doNotShowQuestion) || signedUp) && ( | ||
<h2 | ||
className={clsx("text-base md:text-lg text-blue-900 font-bold", { | ||
"mb-3": !signedUp, | ||
})} | ||
> | ||
{signedUp | ||
? `Thanks for signing up for access to Konfig SDKs 🎉!` | ||
: `Start building faster with Konfig SDKs`} | ||
</h2> | ||
)} | ||
{signedUp ? ( | ||
<div className="text-blue-800"> | ||
<p className="mb-4 !mt-0"> | ||
Your email, <span className="italic">{signedUpEmail}</span>, has | ||
been successfully registered for access to Konfig SDKs. We will | ||
notify you by email soon. | ||
</p> | ||
<p className="mb-0"> | ||
For questions, please contact us at{" "} | ||
<a href="mailto:[email protected]" className="font-bold"> | ||
[email protected] | ||
</a> | ||
</p> | ||
</div> | ||
) : null} | ||
{signedUp ? null : ( | ||
<input | ||
type="email" | ||
name="email" | ||
className="rounded-md border px-2 py-1 w-full mb-2" | ||
placeholder="Email" | ||
value={email} | ||
onChange={(e) => setEmail(e.target.value)} | ||
/> | ||
)} | ||
{signedUp ? null : ( | ||
<button | ||
type="submit" | ||
className="font-medium group flex gap-3 hover:gap-2 items-center transition-all bg-gradient-to-br text-white w-fit text-center px-3 py-2 from-blue-600 to-blue-800 rounded-md text-sm" | ||
> | ||
{loading ? ( | ||
<LoadingIcon /> | ||
) : ( | ||
<> | ||
<div>Sign up for access to Konfig SDKs</div> | ||
<IconPencil | ||
size="1rem" | ||
className="transition-all group-hover:text-blue-50 text-blue-300" | ||
/> | ||
</> | ||
)} | ||
</button> | ||
)} | ||
</div> | ||
</form> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -2,9 +2,10 @@ | |
image: /img/konfig-sdks.png | ||
title: Konfig SDKs for Public APIs | ||
description: Konfig SDKs is a one-of-a-kind service for developers that want to write and maintain less API integration code. If you're ready to simplify your API integrations, get started with Konfig today! | ||
|
||
--- | ||
|
||
import { SdkSignupForm } from "@site/src/components/SdkSignupForm"; | ||
|
||
<div style={{maxWidth: "740px"}} class="markdown ml-auto"> | ||
|
||
![Banner](/img/konfig-sdks.png) | ||
|
@@ -14,6 +15,8 @@ write and maintain less API integration code. We do this by providing consistent | |
and well-documented SDKs for your API integrations, reducing code in your | ||
codebase and ensuring it stays up-to-date. | ||
|
||
<SdkSignupForm /> | ||
|
||
## Why? | ||
|
||
External API integrations are a pain to develop. Writing and maintaining your | ||
|
@@ -50,6 +53,8 @@ We charge based on the number of SDKs you use. | |
|
||
## Interested? | ||
|
||
Checkout the growing list of [SDKs](/sdk/category/all) we offer and email us for access at [email protected] | ||
Checkout the growing list of [SDKs](/sdk/category/all) and sign up below. | ||
|
||
<SdkSignupForm /> | ||
|
||
</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