forked from TowhidKashem/snapchat-clone
-
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
d38fbdc
commit 5b88980
Showing
10 changed files
with
104 additions
and
6 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"printWidth": 80, | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
|
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,2 @@ | ||
.input { | ||
} |
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,27 @@ | ||
import React from 'react'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import styles from './index.module.scss'; | ||
|
||
interface Props { | ||
placeholder: string; | ||
leftIcon: any; | ||
rightIcon: any; | ||
rightIconClick: () => void; | ||
} | ||
|
||
const Input: React.FC<Props> = ({ placeholder, leftIcon, rightIcon, rightIconClick }) => { | ||
const iconClick = rightIconClick | ||
? { | ||
onClick: rightIconClick | ||
} | ||
: {}; | ||
return ( | ||
<div className={styles.input}> | ||
{leftIcon && <FontAwesomeIcon icon={leftIcon} />} | ||
<input type="text" placeholder={placeholder} /> | ||
{rightIcon && <FontAwesomeIcon icon={rightIcon} {...iconClick} />} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
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,21 @@ | ||
.toolbar { | ||
color: white; | ||
padding: 5px 10px 10px; | ||
|
||
display: grid; | ||
grid-template-columns: 50% 50%; | ||
|
||
article { | ||
} | ||
|
||
svg { | ||
color: white; | ||
margin-left: 8px; | ||
} | ||
|
||
.left { | ||
} | ||
.right { | ||
text-align: right; | ||
} | ||
} |
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 from 'react'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { | ||
faLocationArrow, | ||
faSignal, | ||
faBatteryHalf | ||
} from '@fortawesome/free-solid-svg-icons'; | ||
import styles from './index.module.scss'; | ||
|
||
const Toolbar: React.SFC<{}> = () => { | ||
const { useState } = React; | ||
const [time, setTime] = useState<string>(); | ||
|
||
const updateTime = () => { | ||
const time = new Date().toLocaleTimeString('en-us', { | ||
hour: 'numeric', | ||
minute: '2-digit' | ||
}); | ||
setTime(time); | ||
}; | ||
|
||
setInterval(updateTime, 1000); | ||
|
||
return ( | ||
<div className={styles.toolbar}> | ||
<article className={styles.left}> | ||
<time>{time}</time> | ||
<FontAwesomeIcon icon={faLocationArrow} /> | ||
</article> | ||
<article className={styles.right}> | ||
<FontAwesomeIcon icon={faSignal} /> | ||
<FontAwesomeIcon icon={faBatteryHalf} /> | ||
</article> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Toolbar; |
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