-
Notifications
You must be signed in to change notification settings - Fork 1
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 #423 from Studio-Yandex-Practicum/422-breakpoints
#422-beakpoints
- Loading branch information
Showing
12 changed files
with
204 additions
and
13 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
45 changes: 43 additions & 2 deletions
45
src/components/PageControls/PageControlsSkeletons/PageControlsSkeletons.module.scss
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
56 changes: 56 additions & 0 deletions
56
src/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss
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,56 @@ | ||
@use '@/shared/styles/utils/mixins' as media; | ||
|
||
.category-list { | ||
display: block; | ||
} | ||
|
||
.customButton { | ||
display: none; | ||
background-color: white; | ||
|
||
svg { | ||
width: 20px; | ||
height: 20px; | ||
padding-left: 10px; | ||
} | ||
|
||
@include media.respond-to('large') { | ||
display: flex; | ||
max-width: 310px; | ||
} | ||
} | ||
|
||
.buttonClose{ | ||
background-color: white; | ||
width: 100%; | ||
} | ||
|
||
.modalBlock { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
width: inherit; | ||
height: inherit; | ||
padding: 15%; | ||
|
||
@include media.respond-to('middle') { | ||
padding: 7%; | ||
} | ||
|
||
@include media.respond-to('small') { | ||
padding: 3%; | ||
} | ||
} | ||
|
||
.modal { | ||
width: inherit; | ||
} | ||
|
||
.mobileVisible { | ||
@include media.respond-to('large') { | ||
display: block; | ||
width: 100%; | ||
max-height: 500px; | ||
} | ||
} | ||
|
46 changes: 46 additions & 0 deletions
46
src/entities/CategoryListMobilePopup/CategoryListMobilePopup.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { type FC, useState } from 'react' | ||
|
||
import styles from '@/entities/CategoryListMobilePopup/CategoryListMobilePopup.module.scss' | ||
import MobileMenuIcon from '@/shared/icons/MobileMenuIcon.svg' | ||
import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button' | ||
import Modal from '@/shared/ui/Modal/Modal' | ||
import { CategoryList } from '@/widgets/CategoryList/CategoryList' | ||
|
||
export const CategoryListMobilePopup: FC = () => { | ||
const [isModalOpen, setIsModalOpen] = useState(false) | ||
const [isModalClosing, setIsModalClosing] = useState(false) | ||
const changeModalState = () => { | ||
setIsModalOpen(!isModalOpen) | ||
} | ||
return ( | ||
<> | ||
<Button | ||
className={styles.customButton} | ||
theme={ButtonTheme.OUTLINED} | ||
size={ButtonSize.S} | ||
onClick={changeModalState}> | ||
Категории | ||
<MobileMenuIcon className={styles.customButton} /> | ||
</Button> | ||
{isModalOpen && ( | ||
<Modal | ||
className={styles.modal} | ||
isModalOpen={isModalOpen} | ||
onClose={changeModalState} | ||
isModalClosing={isModalClosing} | ||
setIsModalClosing={setIsModalClosing}> | ||
<div className={styles.modalBlock}> | ||
<CategoryList className={styles.mobileVisible} /> | ||
<Button | ||
className={styles.buttonClose} | ||
theme={ButtonTheme.OUTLINED} | ||
size={ButtonSize.S} | ||
onClick={changeModalState}> | ||
Закрыть | ||
</Button> | ||
</div> | ||
</Modal> | ||
)} | ||
</> | ||
) | ||
} |
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
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
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