generated from IvettaGoIT/react_vite
-
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.
Merge pull request #63 from MargoMarm/feature/get-exercises_logic
Feature/get exercises logic
- Loading branch information
Showing
15 changed files
with
314 additions
and
115 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { useDispatch } from 'react-redux'; | ||
import { changeStatusFilter } from '../../redux/exercises/slice'; | ||
import { ButtonBack, SvgArrow } from './ExercisesBtnBack.styled'; // Імпорт стилів | ||
|
||
const ExercisesBtnBack = () => { | ||
const dispatch = useDispatch(); | ||
|
||
const handleBtnBack = () => { | ||
dispatch(changeStatusFilter(true)); | ||
}; | ||
|
||
return ( | ||
<ButtonBack type="button" onClick={handleBtnBack}> | ||
<SvgArrow> | ||
<use href="/src/assets/sprite.svg#icon-arrow-left"></use> | ||
</SvgArrow> | ||
Back | ||
</ButtonBack> | ||
); | ||
}; | ||
|
||
export default ExercisesBtnBack; |
62 changes: 62 additions & 0 deletions
62
src/components/ExercisesBtnBack/ExercisesBtnBack.styled.jsx
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,62 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { mq, colors } from '../../utils'; | ||
|
||
export const ButtonBack = styled.button` | ||
display: flex; | ||
padding: 0px; | ||
align-items: center; | ||
font-size: 14px; | ||
line-height: 1.28; | ||
background-color: transparent; | ||
color: ${colors.textWhite04}; | ||
border: none; | ||
scale: 1; | ||
transition: | ||
scale 250ms ease-in-out, | ||
color 250ms ease-in-out; | ||
fill 250ms ease-in-out; | ||
${mq.tablet}{ | ||
font-size: 16px; | ||
line-height: 1.5; | ||
} | ||
&:hover { | ||
color: ${colors.orange}; | ||
scale: 1.1; | ||
} | ||
&:focus { | ||
color: ${colors.orange}; | ||
scale: 1.1; | ||
} | ||
&:hover svg { | ||
fill: ${colors.orange}; | ||
scale: 1.1; | ||
} | ||
&:focus svg { | ||
fill: ${colors.orange}; | ||
scale: 1.1; | ||
} | ||
`; | ||
|
||
export const SvgArrow = styled.svg` | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 8px; | ||
fill: ${colors.textWhite04}; | ||
scale: 1; | ||
transition: | ||
scale 250ms ease-in-out, | ||
fill 250ms ease-in-out; | ||
`; |
53 changes: 33 additions & 20 deletions
53
src/components/ExercisesCategories/ExercisesCategories.jsx
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
Oops, something went wrong.