Skip to content

Commit

Permalink
Merge pull request #178 from Studio-Yandex-Practicum/bug-176-fix-butt…
Browse files Browse the repository at this point in the history
…on-contact-us

#176 bugfix: исправление бага недоступности воздействия на область под скрытым меню контактов
  • Loading branch information
Sibisov-Artem authored Jan 13, 2024
2 parents 1ec0120 + 0ee23f4 commit 73a1210
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/entities/ContactCard/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ContactCard: FC<PropsContactCard> = ({ messenger, Icon }) => {
<div className={styles.icon}>
<Icon />
</div>
<Paragraph className={styles.text}>{messenger.title}</Paragraph>
<Paragraph>{messenger.title}</Paragraph>
</Link>
</li>
)
Expand Down
8 changes: 1 addition & 7 deletions src/entities/ContactCard/contactCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,4 @@
width: 60px;
height: 60px;
margin-bottom: 12px;
}

.text {
color: var.$body-color;
font-size: 15px;
text-align: center;
}
}
3 changes: 2 additions & 1 deletion src/features/Contacts/Contacts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type FC, useState } from 'react'
import classNames from 'classnames'
import { TMessenger } from '@/models/MessengerModel'
import styles from './contacts.module.scss'
import { Button, ButtonTheme, ButtonDesign } from '@/shared/ui/Button/Button'
Expand All @@ -24,7 +25,7 @@ const Contacts: FC<PropsContacts> = ({ messenger }) => {

return (
<div className={styles.contacts}>
<div className={messageMenuActive ? styles.contactsMenu : styles.contactsMenuHidden}>
<div className={classNames(styles.contactsMenu, { [styles.contactsMenuHidden]: !messageMenuActive })}>
<ul className={styles.contactList}>
{messenger.map(item => (
<ContactCard messenger={item} key={item.id} Icon={item.icon} />
Expand Down
15 changes: 7 additions & 8 deletions src/features/Contacts/contacts.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@

.contacts {
position: fixed;
z-index: 999;
right: 20px;
bottom: 20px;
display: flex;
flex-direction: column;
align-items: end;
z-index: 999;
}

.contactsMenu {
visibility: visible;
opacity: 1;
margin: 0 0 17px;
max-width: 501px;
width: 500px;
position: absolute;
bottom: 100%;
right: 0;
transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.contactsMenuHidden {
margin: 0 0 17px;
max-width: 501px;
visibility: hidden;
opacity: 0;
transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.contactList {
Expand All @@ -33,6 +31,7 @@

.button {
transition: transform 0.25s, background-color 0.25s;
border: none;
}

.button:hover {
Expand Down

0 comments on commit 73a1210

Please sign in to comment.