feat: use box component for create team form

This commit is contained in:
Matthew Russell
2024-01-16 17:26:48 -05:00
parent b3bf4b7639
commit 6fc99f1fd7
3 changed files with 23 additions and 20 deletions
@@ -26,6 +26,7 @@ import { DApp, TokenStaticLinks, useLinks } from '@vegaprotocol/environment';
import { RainbowButton } from '../../components/rainbow-button';
import { usePageTitle } from '../../lib/hooks/use-page-title';
import { ErrorBoundary } from '../../components/error-boundary';
import { Box } from '../../components/competitions/box';
interface FormFields {
name: string;
@@ -54,24 +55,26 @@ export const CompetitionsCreateTeam = () => {
<div className="absolute top-o left-0 w-full h-full bg-gradient-to-t from-white dark:from-vega-cdark-900 to-transparent from-20% to-60%" />
</div>
<div className="lg:gap-6 container p-4 mx-auto">
<div className=" flex flex-col gap-4 bg-vega-clight-800 dark:bg-vega-cdark-800 mx-auto md:w-2/3 max-w-xl rounded-lg p-8">
<h1 className="calt text-2xl lg:text-3xl xl:text-5xl">
{t('Create a team')}
</h1>
{pubKey && !isReadOnly ? (
<CreateTeamFormContainer />
) : (
<>
<p>
{t(
'Create a team to participate in team based rewards as well as access the discount benefits of the current referral program.'
)}
</p>
<RainbowButton variant="border" onClick={openWalletDialog}>
{t('Connect wallet')}
</RainbowButton>
</>
)}
<div className="mx-auto md:w-2/3 max-w-xl">
<Box className="flex flex-col gap-4">
<h1 className="calt text-2xl lg:text-3xl xl:text-5xl">
{t('Create a team')}
</h1>
{pubKey && !isReadOnly ? (
<CreateTeamFormContainer />
) : (
<>
<p>
{t(
'Create a team to participate in team based rewards as well as access the discount benefits of the current referral program.'
)}
</p>
<RainbowButton variant="border" onClick={openWalletDialog}>
{t('Connect wallet')}
</RainbowButton>
</>
)}
</Box>
</div>
</div>
</div>
+1 -1
View File
@@ -13,7 +13,7 @@ export const Box = (props: HTMLAttributes<HTMLDivElement>) => {
BORDER_COLOR,
GRADIENT,
'border rounded-lg',
'p-6 flex flex-col items-center gap-6 text-center',
'p-6',
props.className
)}
/>
@@ -28,7 +28,7 @@ export const CompetitionsAction = ({
children?: ReactNode;
}) => {
return (
<Box>
<Box className="flex flex-col items-center gap-6 text-center">
<DudeBadge variant={variant} />
<h2 className="text-2xl">{title}</h2>
{description && <p className="text-muted">{description}</p>}