generated from goitacademy/react-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2422ea
commit fbfc0cf
Showing
16 changed files
with
201 additions
and
61 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,51 @@ | ||
import { | ||
Form, | ||
Label, | ||
Input, | ||
SubmitButton, | ||
Group, | ||
RadioContainer, | ||
RaioDiv, | ||
RadioInput, | ||
} from './ContactForm.styled'; | ||
|
||
export const ContactForm = () => { | ||
return ( | ||
<Form> | ||
<Label> | ||
Name | ||
<Input type="text" name="name" required placeholder="Enter name" /> | ||
</Label> | ||
|
||
<Label> | ||
Number | ||
<Input type="tel" name="number" required placeholder="Enter number" /> | ||
</Label> | ||
|
||
<Group>Group</Group> | ||
<RadioContainer> | ||
<RaioDiv> | ||
Family | ||
<RadioInput type="radio" name="group" value="family" /> | ||
</RaioDiv> | ||
|
||
<RaioDiv> | ||
Friends | ||
<RadioInput type="radio" name="group" value="friends" /> | ||
</RaioDiv> | ||
|
||
<RaioDiv> | ||
Work | ||
<RadioInput type="radio" name="group" value="work" /> | ||
</RaioDiv> | ||
|
||
<RaioDiv> | ||
Others | ||
<RadioInput type="radio" name="group" value="others" checked /> | ||
</RaioDiv> | ||
</RadioContainer> | ||
|
||
<SubmitButton type="submit">Add contact</SubmitButton> | ||
</Form> | ||
); | ||
}; |
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,84 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const Form = styled.form` | ||
width: 400px; | ||
background-color: #78a1bb; | ||
padding: 12px; | ||
border-radius: 8px; | ||
`; | ||
|
||
export const Label = styled.label` | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: 16px; | ||
color: #000000; | ||
font-size: 18px; | ||
margin-bottom: 12px; | ||
`; | ||
|
||
export const Input = styled.input` | ||
padding: 4px; | ||
font-size: 18px; | ||
border-radius: 4px; | ||
border: 2px solid transparent; | ||
outline: transparent; | ||
&:focus { | ||
border-color: #e9af3d; | ||
} | ||
&:hover { | ||
border-color: #e9af3d; | ||
} | ||
`; | ||
|
||
export const SubmitButton = styled.button` | ||
padding: 8px 24px; | ||
font-size: 16px; | ||
color: #000000; | ||
background-color: #e9af3d; | ||
`; | ||
|
||
export const Group = styled.p` | ||
color: #000000; | ||
font-size: 18px; | ||
margin-bottom: 4px; | ||
`; | ||
|
||
export const RadioContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
`; | ||
|
||
export const RaioDiv = styled.div` | ||
position: relative; | ||
padding: 0px 0px 0px 26px; | ||
margin-bottom: 20px; | ||
line-height: 24px; | ||
&:before { | ||
position: absolute; | ||
content: ''; | ||
width: 20px; | ||
height: 20px; | ||
left: 0; | ||
top: 0; | ||
background-color: #ffffff; | ||
border-radius: 50%; | ||
} | ||
&:after { | ||
position: absolute; | ||
content: ''; | ||
width: 14px; | ||
height: 14px; | ||
left: 3px; | ||
top: 3px; | ||
background-color: #78a1bb; | ||
border-radius: 50%; | ||
} | ||
`; | ||
|
||
export const RadioInput = styled.input` | ||
display: none; | ||
`; |
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,3 @@ | ||
export const ContactsList = () => { | ||
return <div>Contacts</div>; | ||
}; |
Empty file.
Empty file.
Empty file.
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
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import { ContactForm } from 'components/ContactForm/ContactForm'; | ||
import { ContactsList } from 'components/ContactsList/ContactsList'; | ||
|
||
const ContactsPage = () => { | ||
return <div>Contacts Page</div>; | ||
return ( | ||
<> | ||
<ContactForm /> | ||
<ContactsList /> | ||
</> | ||
); | ||
}; | ||
|
||
export default ContactsPage; |
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 |
---|---|---|
@@ -1,11 +1,7 @@ | ||
import { HomeContainer, Title } from './HomePage.styled'; | ||
import { Title } from './HomePage.styled'; | ||
|
||
const HomePage = () => { | ||
return ( | ||
<HomeContainer> | ||
<Title>Hello my friend</Title> | ||
</HomeContainer> | ||
); | ||
return <Title>Hello my friend</Title>; | ||
}; | ||
|
||
export default HomePage; |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const HomeContainer = styled.div``; | ||
|
||
export const Title = styled.h1` | ||
font-size: 60px; | ||
`; |
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,22 @@ | ||
import styled from '@emotion/styled'; | ||
import { NavLink } from 'react-router-dom'; | ||
|
||
export const ErrorContainer = styled.div` | ||
text-align: center; | ||
background-color: #78a1bb; | ||
padding: 20px; | ||
border-radius: 4px; | ||
`; | ||
|
||
export const ErrorTitle = styled.h1` | ||
font-size: 60px; | ||
`; | ||
|
||
export const Text = styled.p` | ||
font-size: 18px; | ||
`; | ||
|
||
export const StyledLink = styled(NavLink)` | ||
color: #000000; | ||
font-size: 44px; | ||
`; |
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 @@ | ||
|