Skip to content

Commit

Permalink
Add gradient button to large card
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroBailaAndrade committed Dec 27, 2023
1 parent cd3340d commit 723fb24
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion workspaces/website/src/components/Card/ImageIconCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { CardGradientBorder } from "@ui/Card/components/CardGradientBorder";
import { getComputedLinkData } from "src/utils/utils";
import { CustomLink } from "@ui/Link/CustomLink";
import { LinkData } from "@starknet-io/cms-data/src/settings/main-menu";
import { Button } from "@ui/Button";

type Props = {
variant?: "image_icon_link_card" | "icon_link_card" | "dapp" | "large_card" | "community_card";
Expand Down Expand Up @@ -69,6 +70,7 @@ export const ImageIconCard = ({
let linkVariant;
let cardFooterPadding;
let globalPadding;
let buttonVariant;
switch (variant) {
case "image_icon_link_card":
titleVariant = size === "large" ? "h3" : "h4";
Expand All @@ -92,6 +94,7 @@ export const ImageIconCard = ({
descriptionVariant = "body";
cardFooterPadding = "24px 0 0 0";
linkVariant = "cardLink";
buttonVariant = "gradient";
break;
case "community_card":
titleVariant = "h4";
Expand Down Expand Up @@ -200,7 +203,17 @@ export const ImageIconCard = ({
</Stack>
</CardBody>

{link && variant !== "dapp" && variant !== "community_card" && (
{link && variant === "large_card" && (
<CardFooter padding={cardFooterPadding}>
<ButtonGroup spacing="2">
<Button href={href} variant={buttonVariant}>
{label} &rarr;
</Button>
</ButtonGroup>
</CardFooter>
)}

{link && variant !== "dapp" && variant !== "community_card" && variant !== "large_card" && (
<CardFooter padding={cardFooterPadding}>
<ButtonGroup spacing="2">
<CustomLink
Expand Down

0 comments on commit 723fb24

Please sign in to comment.