Skip to content

Commit

Permalink
VEES-0 | Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Melior committed Jan 10, 2025
1 parent 9c75256 commit f9be6d2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

> Самое удобное приложение для записи результатов тренировок (:

- ✨🎨 Разработан [дизайн в Figma](https://www.figma.com/design/l7WmZZ7WKEr3YnVNdibxGD/Mobile-App?node-id=250-793&t=7fycS0Obh0DIcwXF-1)
- Собственный [UI Kit](/src/shared/ui/)
- Серверный рендеринг и [AppRouter](https://nextjs.org/docs/app)
Expand Down
2 changes: 1 addition & 1 deletion src/app/(with-navbar)/settings/ui/SettingsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getThemeName = (theme: string | undefined) => {
case 'light':
return 'Светлая тема';
default:
return 'Тема не выбрана';
return 'Как в системе';
}
};

Expand Down
4 changes: 1 addition & 3 deletions src/shared/ui/Modal/ui/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export interface IModal {
closeOnClickOverlay?: boolean
onClickOverlay?: () => void
onClose?: () => void
placement?: 'start' | 'center' | 'end'
}

export const Modal = ({
Expand All @@ -24,7 +23,6 @@ export const Modal = ({
closeOnClickOverlay = true,
onClickOverlay,
onClose,
placement = 'start',
}: IModal) => {
const [isMount, setMount] = useState(false);

Expand Down Expand Up @@ -66,7 +64,7 @@ export const Modal = ({
{isMount && portalTarget ? createPortal(
<>
<div className="overlay" onClick={handleClickOverlay} />
<Flex align={placement} className={styles.wrapper} justify="center">
<Flex className={styles.wrapper} justify="center">
<div className={styles.modal}>
{children}
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/shared/ui/Modal/ui/Modal/modal.module.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
.wrapper {
align-items: center;
position: fixed;
top: 0;
left: 0;
z-index: theme('zIndex.overlayChild');
width: 100vw;
height: 100vh;
pointer-events: none;

@media (max-width: theme('screens.sm')) {
align-items: start;
}
}

.modal {
Expand Down

0 comments on commit f9be6d2

Please sign in to comment.