-
Notifications
You must be signed in to change notification settings - Fork 10
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 #106 from threshold-network/taco-section
Add Taco section in home page ## Description Add Taco Section to the website home page. - Add taco section in home page - 0f0ac42 Figma's design prototype: https://www.figma.com/file/AFYQHD8qWxJwNjryGvelVC/Taco-Section?type=design&node-id=61-1235&mode=design&t=H8cV1TsjluQLWo1j-0 ## Notice - [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/shapeshift/web/pulls) for the same update/change? ## Pull Request Type - [x] New Feature (Breaking/Non-breaking Change) ## Issue (if applicable) Closes issue #90 ## Testing Please outline all testing steps 1. Clone the repo - git clone https://github.com/threshold-network/website.git 2. Install dependencies - yarn install 3. Run the app - yarn start
- Loading branch information
Showing
9 changed files
with
474 additions
and
122 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,48 @@ | ||
import { FC } from "react" | ||
import { HStack, Stack, Square, StackDivider } from "@chakra-ui/react" | ||
import { BodyMd, LabelMd } from "./Typography" | ||
import { Image } from "." | ||
import { SubItem } from "../templates/home-page/InfoColumnsSection" | ||
import { ResponsiveStack } from "./PageSection" | ||
import useChakraBreakpoint from "../hooks/useChakraBreakpoint" | ||
|
||
const InfoColumnsStack: FC<{ | ||
subitems: SubItem[] | ||
}> = ({ subitems }) => { | ||
const isMobile = useChakraBreakpoint("md") | ||
|
||
return ( | ||
<ResponsiveStack | ||
spacing="32px !important" | ||
mt={32} | ||
divider={isMobile ? <StackDivider bg="gray.700" /> : undefined} | ||
> | ||
{subitems.slice(0, 3).map((_: SubItem) => ( | ||
<Stack | ||
maxW={{ base: "100%", md: "300px" }} | ||
w="full" | ||
direction={{ | ||
base: "row", | ||
md: "column", | ||
}} | ||
spacing={8} | ||
> | ||
<Image w="128px" h="128px" {..._.image} /> | ||
<Stack direction="column"> | ||
<HStack> | ||
<Square bg="brand.500" w="20px" h="20px" /> | ||
<LabelMd textTransform="uppercase">{_.title}</LabelMd> | ||
</HStack> | ||
<BodyMd | ||
mt="1rem" | ||
as="div" | ||
dangerouslySetInnerHTML={{ __html: _.description }} | ||
/> | ||
</Stack> | ||
</Stack> | ||
))} | ||
</ResponsiveStack> | ||
) | ||
} | ||
|
||
export default InfoColumnsStack |
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 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,51 @@ | ||
import React, { FC } from "react" | ||
import { BoxProps } from "@chakra-ui/react" | ||
import { ImageProps } from "../../components" | ||
import SectionTemplate from "./SectionTemplate" | ||
import InfoColumnsStack from "../../components/InfoColumnsStack" | ||
|
||
export interface SubItem { | ||
description: string | ||
image: ImageProps | ||
title: string | ||
} | ||
|
||
interface ButtonInfo { | ||
label: string | ||
url: string | ||
variant: string | ||
} | ||
|
||
interface InfoColumnsSectionProps extends BoxProps { | ||
buttons: ButtonInfo[] | ||
description: string | ||
subitems: SubItem[] | ||
title: string | ||
bgColor: string | ||
image?: ImageProps | ||
} | ||
|
||
const InfoColumnsSection: FC<InfoColumnsSectionProps> = ({ | ||
title, | ||
description, | ||
subitems, | ||
buttons, | ||
image, | ||
bgColor, | ||
...boxProps | ||
}) => { | ||
return ( | ||
<SectionTemplate | ||
title={title} | ||
description={description} | ||
image={image} | ||
buttons={buttons} | ||
bgColor={bgColor} | ||
{...boxProps} | ||
> | ||
<InfoColumnsStack subitems={subitems} /> | ||
</SectionTemplate> | ||
) | ||
} | ||
|
||
export default InfoColumnsSection |
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.