-
Notifications
You must be signed in to change notification settings - Fork 52
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
Showing
76 changed files
with
2,671 additions
and
2,139 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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
import React from 'react'; | ||
|
||
import Navigation from './navigation/Navigation'; | ||
|
||
const App = (): React.JSX.Element => <Navigation />; | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const Box = ({ children }: IProps): React.JSX.Element => <div className='box'>{children}</div>; | ||
|
||
export default Box; |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
type: string; | ||
text: string; | ||
onClick: (e: React.FormEvent) => void; | ||
} | ||
|
||
const FormButton = ({ type, text, onClick }: IProps): React.JSX.Element => ( | ||
<button | ||
onClick={onClick} | ||
type={type === 'submit' ? 'submit' : 'button'} | ||
className='button button-purple button-medium' | ||
> | ||
{text} | ||
</button> | ||
); | ||
|
||
export default FormButton; |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
name: string; | ||
text: string; | ||
checked: boolean; | ||
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
} | ||
|
||
const FormCheckbox = ({ name, text, onChange, checked }: IProps): React.JSX.Element => ( | ||
<label className='checkbox-container'> | ||
{text} | ||
<input | ||
value='0' | ||
id={name} | ||
name={name} | ||
type='checkbox' | ||
onChange={onChange} | ||
defaultChecked={checked} | ||
/> | ||
<span className='checkmark' /> | ||
</label> | ||
); | ||
|
||
export default FormCheckbox; |
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
type: string; | ||
name: string; | ||
value: string; | ||
placeholder: string; | ||
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
} | ||
|
||
const FormInput = ({ type, name, value, placeholder, onChange }: IProps): React.JSX.Element => ( | ||
<input | ||
id={name} | ||
name={name} | ||
type={type} | ||
value={value} | ||
autoComplete='off' | ||
onChange={onChange} | ||
placeholder={placeholder} | ||
/> | ||
); | ||
|
||
export default FormInput; |
23 changes: 10 additions & 13 deletions
23
src/components/Header/Header.js → src/components/Header/Header.tsx
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,23 +1,20 @@ | ||
import { memo } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
|
||
// components | ||
import HeaderLeft from './HeaderLeft'; | ||
import HeaderRight from './HeaderRight'; | ||
|
||
const Header = memo(({ icon, title }) => ( | ||
// interfaces | ||
interface IProps { | ||
icon?: string; | ||
title: string; | ||
} | ||
|
||
const Header = ({ icon, title }: IProps): React.JSX.Element => ( | ||
<header className='flex flex-center flex-space-between'> | ||
<HeaderLeft icon={icon} title={title} /> | ||
<HeaderRight /> | ||
</header> | ||
)); | ||
|
||
Header.defaultProps = { | ||
icon: null, | ||
}; | ||
|
||
Header.propTypes = { | ||
icon: PropTypes.string, | ||
title: PropTypes.string.isRequired, | ||
}; | ||
); | ||
|
||
export default Header; |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
icon?: string; | ||
title: string; | ||
} | ||
|
||
const HeaderLeft = ({ icon, title }: IProps): React.JSX.Element => ( | ||
<div className='header-left nowrap no-select'> | ||
{icon && ( | ||
<button type='button' className='pointer'> | ||
<i className='material-icons'>{icon}</i> | ||
</button> | ||
)} | ||
<h1>{title}</h1> | ||
</div> | ||
); | ||
|
||
export default HeaderLeft; |
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
Oops, something went wrong.