-
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.
- Loading branch information
Showing
20 changed files
with
655 additions
and
617 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,26 +1,29 @@ | ||
import sprite from '../../assets/sprite.svg'; | ||
import css from './CalBox.module.css'; | ||
import { | ||
CalBoxDiv, | ||
CalEllips, | ||
IconRun, | ||
CaloriesSum, | ||
K, | ||
CalText, | ||
} from './CalBox.styled'; | ||
|
||
const CalBox = ({ caloriesSum }) => { | ||
const burnCalSum = Math.round(caloriesSum / 1000); | ||
|
||
return ( | ||
<div className={css.cal_box}> | ||
<div className={css.cal_ellips}> | ||
<svg className={css.icon_run}> | ||
<use | ||
className={css.icon_run} | ||
href={`${sprite}#icon-running-stick-figure-svgrepo-com-1-1`} | ||
/> | ||
</svg> | ||
</div> | ||
<span className={css.cal}> | ||
<CalBoxDiv> | ||
<CalEllips> | ||
<IconRun> | ||
<use href={`${sprite}#icon-running-stick-figure-svgrepo-com-1-1`} /> | ||
</IconRun> | ||
</CalEllips> | ||
<CaloriesSum> | ||
{!caloriesSum ? 500 : caloriesSum > 1000 ? burnCalSum : caloriesSum} | ||
</span> | ||
<span className={css.k}>{caloriesSum > 1000 && 'K '}</span> | ||
{/* <span className={css.cal}>{!caloriesSum ? `500` : caloriesSum}</span> */} | ||
<span className={css.cal_text}>cal</span> | ||
</div> | ||
</CaloriesSum> | ||
<K>{caloriesSum > 1000 && 'K '}</K> | ||
<CalText>cal</CalText> | ||
</CalBoxDiv> | ||
); | ||
}; | ||
export default CalBox; |
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,25 +1,17 @@ | ||
import css from './SignBtns.module.css'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { Buttons, SignButton } from './SignBtns.styled'; | ||
|
||
export const SignBtns = () => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<div className={css.btns}> | ||
<button | ||
type="button" | ||
className={`${css.sing_btn} ${css.up} `} | ||
onClick={() => navigate('signup')} | ||
> | ||
<Buttons> | ||
<SignButton orange type="button" onClick={() => navigate('signup')}> | ||
Sign Up | ||
</button> | ||
<button | ||
type="button" | ||
className={`${css.sing_btn} ${css.in}`} | ||
onClick={() => navigate('signin')} | ||
> | ||
</SignButton> | ||
<SignButton type="button" onClick={() => navigate('signin')}> | ||
Sign In | ||
</button> | ||
</div> | ||
</SignButton> | ||
</Buttons> | ||
); | ||
}; |
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,39 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const Buttons = styled.div` | ||
display: flex; | ||
gap: 14px; | ||
@media (min-width: 768px) { | ||
gap: 20px; | ||
} | ||
`; | ||
export const SignButton = styled.button` | ||
display: flex; | ||
padding: 12px 40px; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 12px; | ||
font-weight: 500; | ||
line-height: 1.12; | ||
color: var(--white, #efede8); | ||
border: 1px solid var(--border, #efede84d); | ||
transition: | ||
border-color 250ms linear, | ||
background-color 250ms linear; | ||
background-color: ${(props) => | ||
props.orange ? 'var(--orange, #e6533c);' : 'transparent'}; | ||
&:hover, | ||
&:focus { | ||
${(props) => | ||
props.orange | ||
? 'background-color: var(--orange-1, #ef8964)' | ||
: 'border-color: var(--orange, #e6533c)'} | ||
} | ||
@media (min-width: 768px) { | ||
padding: 16px 60px; | ||
font-size: 20px; | ||
line-height: 1.2; | ||
} | ||
`; |
Oops, something went wrong.