Skip to content

Commit

Permalink
Merge pull request #1074 from starknet-io/post-card-maxw
Browse files Browse the repository at this point in the history
Fix single card taking whole space in blog
  • Loading branch information
lorcan-codes authored Jul 21, 2023
2 parents a9752f2 + db160c0 commit fa018c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workspaces/website/src/components/ArticleCard/ArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Image as ChakraImage,
Icon,
Flex,
ChakraProps,
} from "@chakra-ui/react";
import { Text } from "@ui/Typography/Text";
import { Heading } from "@ui/Typography/Heading";
Expand All @@ -17,11 +18,12 @@ type RootProps = {
children: React.ReactNode;
href: string;
type?: | "grid" | "featured";
sx?: ChakraProps['sx']
};

const Root = ({ children, href, type = "grid" }: RootProps) => {
const Root = ({ children, href, type = "grid", sx }: RootProps) => {
return (
<CardGradientBorder padding="0" borderRadius={{ base: "8px" }} overflow="hidden">
<CardGradientBorder padding="0" borderRadius={{ base: "8px" }} overflow="hidden" sx={sx}>
<Box as="a" href={href} _hover={{ textDecor: "none" }} role="group">
<Box p="0" height="full" borderRadius="8px" bg="card-bg">
<Flex
Expand Down
1 change: 1 addition & 0 deletions workspaces/website/src/pages/posts/PostsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ function CustomHits({ categories, params }: Pick<Props, "categories" | "params">
<ArticleCard.Root
href={`/${hit.locale}/posts/${category?.slug}/${hit.slug}`}
key={i}
sx={{maxW: {base: "none", lg: "440px", xl: "400px"}}}
>
<ArticleCard.Image url={hit.image} />

Expand Down

0 comments on commit fa018c0

Please sign in to comment.