generated from mantinedev/vite-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Mayank-704/master
Hoisting Page Form
- Loading branch information
Showing
5 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
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,13 @@ | ||
.formContainer { | ||
background-color: #fff; | ||
padding: 2rem; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.formContainer { | ||
padding: 1rem; | ||
} | ||
} | ||
|
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,32 @@ | ||
import React from 'react'; | ||
import { TextInput, Textarea, Container, Grid } from '@mantine/core'; | ||
import styles from './HpDetailsPage.module.css'; | ||
|
||
const HpDetailsPage: React.FC = () => { | ||
return ( | ||
<Container className={styles.formContainer}> | ||
<Grid> | ||
<Grid.Col span={12} > | ||
<TextInput label="Tournament Name" placeholder="Enter tournament Name" required /> | ||
</Grid.Col> | ||
<Grid.Col span={6} > | ||
<TextInput label="Start Date" placeholder="DD/MM/YYYY" required /> | ||
</Grid.Col> | ||
<Grid.Col span={6} > | ||
<TextInput label="End Date" placeholder="DD/MM/YYYY" required /> | ||
</Grid.Col> | ||
<Grid.Col span={12} > | ||
<TextInput label="Venue Name" placeholder="Enter the venue name" required /> | ||
</Grid.Col> | ||
<Grid.Col span={12} > | ||
<TextInput label="City" placeholder="Enter City" required /> | ||
</Grid.Col> | ||
<Grid.Col span={12}> | ||
<Textarea label="Tournament Details" placeholder="Provide details of the tournament" required /> | ||
</Grid.Col> | ||
</Grid> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default HpDetailsPage; |
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 @@ | ||
.navbar { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 1rem; | ||
background-color: #e0f7fa; | ||
} | ||
|
||
.logo { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
} | ||
|
||
.links { | ||
display: flex; | ||
gap: 1rem; | ||
} | ||
|
||
.burger { | ||
display: none; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.links { | ||
display: none; | ||
} | ||
.burger { | ||
display: block; | ||
} | ||
} | ||
|
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,38 @@ | ||
import React, { useState } from 'react'; | ||
import { Burger, Drawer, Group, Button } from '@mantine/core'; | ||
import styles from './HpFormNavbar.module.css'; | ||
|
||
const HpFormNavbar: React.FC = () => { | ||
const [opened, setOpened] = useState(false); | ||
|
||
return ( | ||
<> | ||
<div className={styles.navbar}> | ||
<div className={styles.logo}>Sports Event</div> | ||
<div className={styles.links}> | ||
<Button variant="subtle">Details</Button> | ||
<Button variant="subtle">Links</Button> | ||
<Button variant="subtle">Prizes</Button> | ||
<Button variant="subtle">Schedule</Button> | ||
<Button variant="subtle">Submit</Button> | ||
</div> | ||
<Burger opened={opened} onClick={() => setOpened((o) => !o)} className={styles.burger} /> | ||
</div> | ||
<Drawer | ||
opened={opened} | ||
onClose={() => setOpened(false)} | ||
title="Menu" | ||
padding="md" | ||
size="sm" | ||
> | ||
<Button variant="subtle" fullWidth>Details</Button> | ||
<Button variant="subtle" fullWidth>Links</Button> | ||
<Button variant="subtle" fullWidth>Prizes</Button> | ||
<Button variant="subtle" fullWidth>Schedule</Button> | ||
<Button variant="subtle" fullWidth>Submit</Button> | ||
</Drawer> | ||
</> | ||
); | ||
}; | ||
|
||
export default HpFormNavbar; |
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