-
Notifications
You must be signed in to change notification settings - Fork 39
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 #1382 from ghoshnirmalya/feat/upgrade-docs
Update guides
- Loading branch information
Showing
28 changed files
with
769 additions
and
470 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
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,107 @@ | ||
import { | ||
Box, | ||
Heading, | ||
HStack, | ||
Link as _Link, | ||
Text, | ||
VStack, | ||
} from "@chakra-ui/react"; | ||
import React, { FC } from "react"; | ||
import { IoLogoGithub, IoMdEye } from "react-icons/io"; | ||
|
||
interface IProps { | ||
heading: string; | ||
description: string; | ||
githubLink: string; | ||
demoLink: string; | ||
} | ||
|
||
const Jumbotron: FC<IProps> = ({ | ||
heading, | ||
description, | ||
githubLink, | ||
demoLink, | ||
}) => { | ||
const githubButtonNode = () => { | ||
if (!githubLink) { | ||
return false; | ||
} | ||
|
||
return ( | ||
<_Link | ||
py={2} | ||
px={4} | ||
href={githubLink} | ||
rounded="md" | ||
bg="#333" | ||
color="#fff" | ||
fontWeight="bold" | ||
isExternal | ||
textDecoration="none" | ||
> | ||
<HStack spacing={2} alignItems="center"> | ||
<Box as={IoLogoGithub} /> | ||
<Box>View source</Box> | ||
</HStack> | ||
</_Link> | ||
); | ||
}; | ||
|
||
const demoButtonNode = () => { | ||
if (!demoLink) { | ||
return false; | ||
} | ||
|
||
return ( | ||
<_Link | ||
py={2} | ||
px={4} | ||
href={demoLink} | ||
rounded="md" | ||
bg="#754abb" | ||
color="#fff" | ||
fontWeight="bold" | ||
isExternal | ||
> | ||
<HStack spacing={2} alignItems="center"> | ||
<Box as={IoMdEye} /> | ||
<Box>View demo</Box> | ||
</HStack> | ||
</_Link> | ||
); | ||
}; | ||
|
||
return ( | ||
<VStack | ||
spacing={2} | ||
alignItems="center" | ||
justifyContent="center" | ||
textAlign="center" | ||
p={[4, 12, 16]} | ||
> | ||
<Box> | ||
<Heading | ||
as="h1" | ||
fontFamily="body" | ||
bgGradient="linear-gradient(to left, #45abff, #673AB7)" | ||
bgClip="text" | ||
> | ||
{heading} | ||
</Heading> | ||
</Box> | ||
<Box> | ||
<Text>{description}</Text> | ||
</Box> | ||
<Box> | ||
<Box d="flex" alignItems="center"> | ||
<HStack spacing={4}> | ||
{githubButtonNode()} | ||
{demoButtonNode()} | ||
</HStack> | ||
</Box> | ||
</Box> | ||
</VStack> | ||
); | ||
}; | ||
|
||
export default Jumbotron; |
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,17 @@ | ||
import _Link from "next/link"; | ||
import React, { FC } from "react"; | ||
|
||
interface IProps { | ||
href: string; | ||
text: string; | ||
} | ||
|
||
const Link: FC<IProps> = ({ href, text }) => { | ||
return ( | ||
<_Link href={href}> | ||
<a>{text}</a> | ||
</_Link> | ||
); | ||
}; | ||
|
||
export default Link; |
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
Oops, something went wrong.
d8bf5ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: