Files
js/components/shared/GeneralCta.tsx
T
480ef20905 New landing (#113)
* New header

* GeneralCta wip

* Add right image

* Mobile fixes

* Prettify

* Update static gradient

* Add union

* Add dashboard section

* Add supported chains section

* Add free section

* Finish merge

* Fix stuff

* Add case studies section

* Gradients shananigans

* Fix borders

* Use ChakraNextImage

* Add Partners

* Fix lgtm

* Fix lgtm 2.0

* Change position

* Add footer and newsletter

* Delete old components

* Add contracts section

* Add get started section (kinda)

* Add union

* no union

* Fix spacing

* Fix copy

* Spacing and stuff

* Add sdk section

* Language selector for SDK section

* Add LinkButton

* Unused imports

* Update Link imports

* Update embed width

* Set active status

* Set active status

* Fix button width

* Add links to case studies

* Add links to partners

* Fix spacing

* Fix react warning

* Fix title/subtitle center issues

* Fix broken link

* Delete start building from menu

* Fix buttons on mobile

* Update images

* Update text

* Add external icon to tw-link

* Make icon a one-off

* Add hover

* small improvements, also make landing page way leaner in terms of size

* iframe a bit better again

* Add tracking everywhere

* Add tracking to CodeSelector

* clean up a bunch of small things everywhere

* doing more things more better

* Clean up, fix textAlign

* Fix lgtm

* Fix leftAlign

* Fix graphic centerAligned

* Fix cta padding

* Change CTA hover behavior

* Button adjustments

* LeftAlign?

* Change header bg with blur

* Fix icon size

* cleanup homepage section (#121)

* cleanup homepage section

* cleanup case-sudy stuff

* thirdweb deploy new design

* Rename union to bottomPattern

* Fix gap on mobile

* Update copy

* Footer isExternal

* Make TrackedLink generic and reuse it

* Fix mobile layout

* Update dashboard section

* Add opacity bg

* Update ContractCard

* Spacing and mobile hero image

* Fix aria-label_

* Fix pre-built contracts

* Latest changes

* Use tracked components

* Small renaming

* add examples scection, update lots of copy

* cheating lol

* nit pick

* Add github urls to example items

* homepage copy & random other fixes

* new multi chain graphic

* Fix typo

* Developer portal -> Docs

* Small fixes

* More small fixes

* Fix subscribe

* iPad fixes

* No italics anymore

* Multichain mobile svg

* Delete unused component

* changes

* Replace png with svg

Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Jarrod Watts <[email protected]>
2022-05-17 16:36:59 -07:00

54 lines
1.1 KiB
TypeScript

import { Box, Icon } from "@chakra-ui/react";
import { useTrack } from "hooks/analytics/useTrack";
import { BsLightningCharge } from "react-icons/bs";
import { ButtonProps, LinkButton } from "tw-components";
interface GeneralCtaProps extends ButtonProps {
size?: ButtonProps["size"];
title?: string;
}
export const GeneralCta: React.FC<GeneralCtaProps> = ({
size = "md",
title = "Start building",
...props
}) => {
const { trackEvent } = useTrack();
return (
<LinkButton
role="group"
leftIcon={
<Icon
as={BsLightningCharge}
color="#1D64EF"
_groupHover={{ color: "#E0507A" }}
/>
}
color="black"
px={20}
py={{ base: 6, md: 8 }}
onClick={() =>
trackEvent({
category: "cta-button",
action: "click",
label: "start",
title,
})
}
textAlign="center"
variant="gradient"
fromcolor="#1D64EF"
tocolor="#E0507A"
size={size}
borderRadius="md"
href="/dashboard"
{...props}
>
<Box as="span" py={0.5}>
{title}
</Box>
</LinkButton>
);
};