Skip to content

Commit

Permalink
Fine tune infobox spacing. Remove unutilised minWidth prop
Browse files Browse the repository at this point in the history
  • Loading branch information
DarksightKellar committed Apr 19, 2024
1 parent 8144f6c commit 4c0bfc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/components/pages/DaoDashboard/Info/DaoInfoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function DaoInfoHeader() {
<Flex
flexWrap="wrap"
justifyContent="space-between"
mb="1rem"
mb="2rem"
>
<Box
width={{ base: '100%', md: '100%', lg: '33%', xl: '40%' }}
Expand Down Expand Up @@ -130,6 +130,7 @@ export function DaoInfoHeader() {
<InfoGovernance />
</InfoBox>
</Box>

<Box
width={{ base: '100%', md: '33.3%', lg: '19%', xl: '20%' }}
ps={{ base: NONE, md: PAD }}
Expand All @@ -141,6 +142,7 @@ export function DaoInfoHeader() {
<InfoProposals />
</InfoBox>
</Box>

<Box
width={{ base: '100%', md: '33.3%', lg: '23%', xl: '20%' }}
ps={{ base: NONE, md: PAD }}
Expand Down
13 changes: 2 additions & 11 deletions src/components/ui/containers/InfoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,21 @@ import { useNavigate } from 'react-router-dom';

type InfoBoxProps = {
minHeight?: string;
minWidth?: { [key: string]: string } | string;
m?: string | number;
to?: string;
background?: string;
children: ReactNode;
} & BoxProps;

export function InfoBox({
minWidth = '100%',
minHeight = '10.6rem',
children,
to,
...rest
}: InfoBoxProps) {
export function InfoBox({ minHeight = '10.6rem', children, to, ...rest }: InfoBoxProps) {
const navigate = useNavigate();
return (
<Box
cursor={to ? 'pointer' : undefined}
onClick={to ? () => navigate(to) : undefined}
minWidth={minWidth}
h="100%"
minHeight={minHeight}
p="1.5rem"
mx="1.5rem"
mx="0.3rem"
borderWidth="0.06rem"
borderColor="neutral-3"
borderRadius="0.5rem"
Expand Down

0 comments on commit 4c0bfc2

Please sign in to comment.