-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from markusahlstrand/enter-email
migrate enter-email page
- Loading branch information
Showing
80 changed files
with
2,196 additions
and
292 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 |
---|---|---|
@@ -1,5 +1,24 @@ | ||
# @authhero/demo | ||
|
||
## 0.6.0 | ||
|
||
### Minor Changes | ||
|
||
- migrate the enter-email page | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies | ||
- [email protected] | ||
|
||
## 0.5.16 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies | ||
- @authhero/kysely-adapter@0.28.0 | ||
- [email protected] | ||
|
||
## 0.5.15 | ||
|
||
### Patch Changes | ||
|
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
import { VendorSettings } from "@authhero/adapter-interfaces"; | ||
import type { FC } from "hono/jsx"; | ||
|
||
type AppLogoProps = { | ||
vendorSettings: VendorSettings; | ||
}; | ||
|
||
const AppLogo: FC<AppLogoProps> = ({ vendorSettings }) => { | ||
if (vendorSettings?.logoUrl) { | ||
return ( | ||
<div className="flex h-9 items-center"> | ||
<img | ||
src={vendorSettings.logoUrl} | ||
className="max-h-full" | ||
alt="Vendor logo" | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
return <></>; | ||
}; | ||
|
||
export default AppLogo; |
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,68 @@ | ||
import cn from "classnames"; | ||
import Spinner from "./Spinner"; | ||
import { PropsWithChildren } from "hono/jsx"; | ||
|
||
// in React we would do | ||
// interface Props extends ButtonHTMLAttributes<HTMLButtonElement> | ||
// to get all the DOM attributes of a button | ||
type Props = { | ||
className?: string; | ||
Component?: string; | ||
variant?: "primary" | "secondary" | "custom"; | ||
// in Nextjs & React we use default DOM element types... | ||
href?: string; | ||
disabled?: boolean; | ||
isLoading?: boolean; | ||
id?: string; | ||
}; | ||
|
||
const Button = ({ | ||
children, | ||
className, | ||
Component = "button", | ||
variant = "primary", | ||
href, | ||
disabled, | ||
isLoading, | ||
id, | ||
}: PropsWithChildren<Props>) => { | ||
const hrefProps = Component === "a" ? { href } : {}; | ||
return ( | ||
// @ts-expect-error - refactor this when migrating to authhero | ||
<Component | ||
class={cn( | ||
"relative w-full rounded-lg text-center", | ||
className, | ||
{ | ||
"px-4 py-5": variant !== "custom", | ||
"bg-primary text-textOnPrimary hover:bg-primaryHover": | ||
variant === "primary", | ||
"border border-gray-300 bg-white text-black": variant === "secondary", | ||
"pointer-events-none cursor-not-allowed opacity-40": disabled, | ||
}, | ||
// focus styles | ||
"focus:outline-none focus:ring", | ||
)} | ||
type="submit" | ||
disabled={disabled} | ||
id={id} | ||
{...hrefProps} | ||
> | ||
<span | ||
className={` | ||
flex items-center justify-center space-x-2 | ||
${isLoading ? "invisible h-0" : "visible h-auto"} | ||
`} | ||
> | ||
{children} | ||
</span> | ||
{isLoading && ( | ||
<div className="absolute left-0 top-0 flex h-full w-full items-center justify-center"> | ||
<Spinner size="medium" /> | ||
</div> | ||
)} | ||
</Component> | ||
); | ||
}; | ||
|
||
export default Button; |
Oops, something went wrong.