-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added: styled-components; prop-types; Avatar
- Loading branch information
Showing
11 changed files
with
8,118 additions
and
8,094 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
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,4 @@ | ||
.Footer { | ||
margin-top: 1rem; | ||
text-align: center; | ||
} |
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,13 +1,29 @@ | ||
import React from 'react' | ||
import propTypes from 'prop-types' | ||
|
||
import './Header.scss' | ||
|
||
const Header = () => { | ||
const Header = ({ onClick }) => { | ||
return ( | ||
<header> | ||
<div className='ui-container'>header</div> | ||
<header className='Header'> | ||
<div className='ui-container'> | ||
<div className='Header_content'> | ||
<span className='Header_logo'>Cv builder</span> | ||
<button className='ui-button isLink' onClick={onClick}> | ||
</button> | ||
</div> | ||
</div> | ||
</header> | ||
) | ||
} | ||
|
||
Header.propTypes = { | ||
onClick: propTypes.func, | ||
} | ||
|
||
Header.defaultProps = { | ||
onClick: () => {}, | ||
} | ||
|
||
export default Header |
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,3 +1,14 @@ | ||
header { | ||
background-color: red; | ||
.Header { | ||
padding: 1rem 0; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.Header_content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.Header_logo { | ||
font-weight: 700; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import styled from 'styled-components' | ||
import propTypes from 'prop-types' | ||
|
||
const Avatar = styled.div` | ||
width: 10rem; | ||
height: 10rem; | ||
margin-right: 4rem; | ||
border-radius: ${(props) => (props.isSquare ? '10px' : '50%')}; | ||
background-color: #bfbfbf; | ||
` | ||
|
||
Avatar.propTypes = { | ||
isSquare: propTypes.bool, | ||
onClick: propTypes.func, | ||
} | ||
|
||
Avatar.defaultProps = { | ||
isSquare: false, | ||
onClick: () => {}, | ||
} | ||
|
||
export default Avatar |
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 @@ | ||
import Avatar from './Avatar' | ||
|
||
export default Avatar |
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,3 +1,6 @@ | ||
// components: | ||
export { default as Header } from './Header' | ||
export { default as Footer } from './Footer' | ||
|
||
// UI components: | ||
export { default as Avatar } from './UI/Avatar' |
Oops, something went wrong.