-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Custom Contracts and Contracts section (#195)
* add custom option on home * add HomeButtonHorizontal variant * refactor CustomContract component * fix layout * add dashboard page and menu * rm contract form dashboard menu and add icon * Dashboard --> Contracts * change folder name to contracts * img uppercase * add styles refactor
- Loading branch information
Showing
9 changed files
with
172 additions
and
17 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Box, Link, Stack, Typography } from '@mui/material' | ||
|
||
export default function Contracts() { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: { sm: '90%', md: '75%', lg: '80%', xl: '60%' }, | ||
margin: '0 auto 2rem auto' | ||
}} | ||
> | ||
<Typography variant="h1" align="center"> | ||
Contracts | ||
</Typography> | ||
<Stack mt={8} flexDirection="column" gap={4} justifyContent={'center'}> | ||
<Typography variant="h3">Sample title</Typography> | ||
<Typography variant="body1"> | ||
The Polkadot Contract Wizard is a non-code tool to generate, compile | ||
and deploy smart contracts on Polkadot Ecosystem. It provides{' '} | ||
<Link | ||
href="https://github.com/w3f/PSPs" | ||
underline="hover" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
standard contracts based on PSP. | ||
</Link> | ||
</Typography> | ||
</Stack> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import * as React from 'react' | ||
import { WrapperButton } from './styled' | ||
import { Typography, Stack, ButtonProps } from '@mui/material' | ||
|
||
import Image from 'next/image' | ||
interface Props extends ButtonProps { | ||
title: string | ||
subtitle: string | ||
imgPath: string | ||
imgProps: { width?: number; height?: number } | ||
} | ||
|
||
export const HomeButtonCustom = (props: Props) => { | ||
const { title, subtitle, imgProps, imgPath, ...restProps } = props | ||
|
||
return ( | ||
<WrapperButton variant="contained" {...restProps}> | ||
<Stack | ||
spacing={{ xs: 1, sm: 0, md: 0 }} | ||
direction="row" | ||
alignItems="center" | ||
> | ||
<Stack | ||
spacing={0} | ||
direction="column" | ||
alignItems="center" | ||
sx={{ width: '5rem' }} | ||
> | ||
<Image alt={title} src={imgPath} {...imgProps} /> | ||
</Stack> | ||
<Stack | ||
direction="column" | ||
alignItems={{ xs: 'center', md: 'center', lg: 'center' }} | ||
sx={{ | ||
width: { xs: '100%', md: '100%', lg: '100%' } | ||
}} | ||
> | ||
<Typography | ||
variant="h3" | ||
sx={{ | ||
fontSize: { xs: '1rem', md: '1.1rem', lg: '1.2rem' } | ||
}} | ||
> | ||
{title} | ||
</Typography> | ||
<Typography | ||
variant="subtitle1" | ||
align="center" | ||
sx={{ | ||
fontSize: { xs: '0.8rem', md: '0.9rem', lg: '0.9rem' }, | ||
opacity: '0.6', | ||
fontWeight: '400' | ||
}} | ||
> | ||
{subtitle} | ||
</Typography> | ||
</Stack> | ||
</Stack> | ||
</WrapperButton> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { styled } from '@mui/material/styles' | ||
import Button, { ButtonProps } from '@mui/material/Button' | ||
|
||
export const WrapperButton = styled(Button)<ButtonProps>(({ theme }) => ({ | ||
color: 'white', | ||
fontSize: '1.4rem', | ||
borderRadius: '1rem', | ||
width: '100%', | ||
backgroundColor: 'transparent', | ||
display: 'flex', | ||
alignItems: 'center', | ||
margin: '0', | ||
position: 'relative', | ||
padding: '1.5rem', | ||
border: 'solid 1px transparent', | ||
backgroundImage: | ||
'linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(90deg, #B214AC, #2EB5FD)', | ||
backgroundOrigin: 'border-box', | ||
backgroundClip: 'content-box, border-box', | ||
boxShadow: '2px 1000px 1px #0D0E13 inset', | ||
[theme.breakpoints.down('sm')]: { | ||
width: '100%', | ||
margin: '0.5rem !important', | ||
padding: '1.3rem' | ||
}, | ||
|
||
'&:hover': { | ||
backgroundImage: | ||
'linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(90deg, #ffffff, #ffb7ff)', | ||
backgroundOrigin: 'border-box', | ||
backgroundClip: 'content-box, border-box', | ||
boxShadow: | ||
'2px 1000px 1px #11121a inset, 0 4px 20px 2px rgba(241, 83, 255, 0.25)' | ||
} | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters