mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* fixes of mobile layout, popovers and contract verification form * fix top bar network menu and icon size on profile button * extend timeout for NameDomains test * fix token test
30 lines
824 B
TypeScript
30 lines
824 B
TypeScript
import { Grid } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import { Heading } from 'toolkit/chakra/heading';
|
|
|
|
interface Props {
|
|
title: string;
|
|
children: React.ReactNode;
|
|
disableScroll?: boolean;
|
|
}
|
|
|
|
const ContractVerificationMethod = ({ title, children, disableScroll }: Props) => {
|
|
const ref = React.useRef<HTMLDivElement>(null);
|
|
|
|
React.useEffect(() => {
|
|
!disableScroll && ref.current?.scrollIntoView({ behavior: 'smooth' });
|
|
}, [ disableScroll ]);
|
|
|
|
return (
|
|
<section ref={ ref }>
|
|
<Heading level="2" mt={ 12 } mb={ 5 }>{ title }</Heading>
|
|
<Grid columnGap="30px" rowGap={{ base: 2, lg: 5 }} templateColumns={{ base: '1fr', lg: 'minmax(0, 680px) minmax(0, 340px)' }}>
|
|
{ children }
|
|
</Grid>
|
|
</section>
|
|
);
|
|
};
|
|
|
|
export default React.memo(ContractVerificationMethod);
|