-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement waitlist page (#210)
Fix #152
- Loading branch information
Showing
7 changed files
with
165 additions
and
2 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,47 @@ | ||
import Avatar from "components/atoms/Avatar/avatar"; | ||
|
||
interface AvatarRollProps { | ||
avatarCount?: number; | ||
} | ||
|
||
const AvatarRoll = ({ avatarCount = 9 }: AvatarRollProps): JSX.Element => { | ||
const rollCount = Array.apply(null, Array(avatarCount)); | ||
|
||
return ( | ||
<div className="flex gap-3 items-center"> | ||
{rollCount.map((roll, index) => ( | ||
<div | ||
key={index} | ||
className={`${ | ||
index === 0 || index === 8 | ||
? "opacity-20" | ||
: index === 1 || index === 7 | ||
? "opacity-40" | ||
: index === 2 || index === 6 | ||
? "opacity-60" | ||
: index === 3 || index === 5 | ||
? "opacity-80" | ||
: "opacity-100" | ||
}`} | ||
> | ||
<Avatar | ||
size={ | ||
index === 0 || index === 8 | ||
? 24 | ||
: index === 1 || index === 7 | ||
? 32 | ||
: index === 2 || index === 6 | ||
? 40 | ||
: index === 3 || index === 5 | ||
? 44 | ||
: 48 | ||
} | ||
avatarURL="https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1064&q=80" | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default AvatarRoll; |
20 changes: 20 additions & 0 deletions
20
components/molecules/ComponentGradient/component-gradient.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,20 @@ | ||
import React from "react"; | ||
|
||
interface ComponentGradientProps { | ||
children: React.ReactNode; | ||
css?: string; | ||
} | ||
|
||
const ComponentGradient = ({ children, css }: ComponentGradientProps) => { | ||
return ( | ||
|
||
<div className="relative overflow-hidden flex justify-center bg-gradient-to-b h-screen from-gradient-dark-one to-gradient-dark-two"> | ||
{/* orange gradient overlay */} | ||
<div className="text-white absolute blur-4xl -bottom-97 w-99 h-98 bg-gradient-radial from-gradient-orange-two to-gradient-orange-one rounded-full"> | ||
</div> | ||
<section>{children}</section> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ComponentGradient; |
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,47 @@ | ||
import ComponentGradient from "../../molecules/ComponentGradient/component-gradient"; | ||
import HeaderLogo from "components/molecules/HeaderLogo/header-logo"; | ||
import Text from "components/atoms/Typography/text"; | ||
import Title from "components/atoms/Typography/title"; | ||
import Button from "components/atoms/Button/button"; | ||
import {FiArrowLeft} from "react-icons/fi"; | ||
import {FaGithub} from "react-icons/fa"; | ||
import AvatarRoll from "components/molecules/AvatarRoll/avatar-roll"; | ||
const WaitlistComponent = () => { | ||
return ( | ||
<ComponentGradient> | ||
<div className="z-10"> | ||
<div className="py-3 flex justify-center"> | ||
<HeaderLogo withBg={false} /> | ||
</div> | ||
<div className="mt-24"> | ||
<div className="text-center"> | ||
<Text className="!text-2xl !font-semibold !text-dark-orange-9 tracking-tight z-10"> | ||
Thanks for signing up! | ||
</Text> | ||
</div> | ||
<div className="max-w-2xl mt-7 px-9 font-semibold"> | ||
<Title className="text-center tracking-tight leading-10 !text-light-slate-1" level={1}> | ||
You and 32 others are on the Open Sauced waitlist. | ||
</Title> | ||
</div> | ||
<div className="flex mt-8 justify-center"> | ||
<AvatarRoll avatarCount={9} /> | ||
</div> | ||
<div className="flex mt-8 flex-col items-center"> | ||
<Button | ||
className="!text-lg hover:!border-dark-orange-9 focus-visible:!ring-dark-orange-3 focus-visible:!ring-2 hover:!bg-dark-orange-3 !bg-dark-orange-2 !border-dark-orange-7 !font-semibold" | ||
type="outline" | ||
> | ||
<FaGithub className="mr-2"/> Share on Twitter | ||
</Button> | ||
<Button className="hover:!bg-dark-orange-3 mt-3" type="link"> | ||
<FiArrowLeft className="mr-1 font-bold" /> Go back home | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</ComponentGradient> | ||
); | ||
}; | ||
|
||
export default WaitlistComponent; |
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,11 @@ | ||
import { ComponentStory } from "@storybook/react"; | ||
import AvatarRoll from "components/molecules/AvatarRoll/avatar-roll"; | ||
|
||
const StoryConfig = { | ||
title: "Design System/Molecules/AvatarRoll" | ||
}; | ||
export default StoryConfig; | ||
|
||
const AvatarRollTemplate: ComponentStory<typeof AvatarRoll> = (args) => <AvatarRoll {...args} />; | ||
|
||
export const AvatarRollDefault = AvatarRollTemplate.bind({}); |
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,12 @@ | ||
import { ComponentStory } from "@storybook/react"; | ||
import ComponentGradient from "components/molecules/ComponentGradient/component-gradient"; | ||
|
||
const StoryConfig = { | ||
title: "Design System/Molecules/ComponentGradient" | ||
}; | ||
export default StoryConfig; | ||
const ComponentGradientTemplate: ComponentStory<typeof ComponentGradient> = (args) => <ComponentGradient {...args} />; | ||
|
||
export const Default = ComponentGradientTemplate.bind({}); | ||
|
||
Default.args = {}; |
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,9 @@ | ||
import WaitlistComponent from "components/organisms/Waitlist/waitlist"; | ||
|
||
const StoryConfig = { | ||
title: "Design System/Organisms/WaitlistComponent" | ||
}; | ||
export default StoryConfig; | ||
|
||
const WaitlistComponentTemplate: React.FC<typeof WaitlistComponent> = (args) => <WaitlistComponent {...args} />; | ||
export const Waitlist = WaitlistComponentTemplate.bind({}); |
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