Skip to content

Commit

Permalink
Merge pull request #114 from Elizabethhub/dmytro-prymache-header-star…
Browse files Browse the repository at this point in the history
…t-page

фікс кнопки
  • Loading branch information
Elizabethhub authored Mar 26, 2024
2 parents 669d3fd + d81cbba commit a494784
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Header/HeaderModal/HeaderModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import {
HeaderModalLogOutContainer,
SpanLogOut,
SpanLogOutQuestion,
StyledCros,
Test1,
Test2,
Test3,
UserIMG,
} from './HeaderModalStyled';
import SettingModal from '../../SettingModal/SettingModal';
Expand All @@ -32,6 +34,8 @@ import { useTranslation } from 'react-i18next';

import { useMediaQuery } from 'react-responsive';
import DivSetting from '../../../language/languageSelectorComponent';
import { StyledCross } from '../../ModalDailyNorma/ModalDailyNorma.styled';
import SvgCross from '../../../images/svg/svgModal/SvgCross';

const HeaderModal = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -160,7 +164,15 @@ const HeaderModal = () => {
<Backdrop onClick={LogOutHeaderModal} $visible={isBackdropVisible} />
<Test2>
<HeaderModalLogOutContainer $visible={isHeaderModalLogOut}>
<SpanLogOut>{t('logOut')}</SpanLogOut>
<Test3>
<SpanLogOut>{t('logOut')}</SpanLogOut>
<StyledCros
onClick={LogOutHeaderModal}
aria-label={t('closeWindow')}
>
<SvgCross />
</StyledCros>
</Test3>
<SpanLogOutQuestion>
{t('doYouReallyWantToLeave')}
</SpanLogOutQuestion>
Expand Down
25 changes: 25 additions & 0 deletions src/components/Header/HeaderModal/HeaderModalStyled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,28 @@ export const Test1 = styled.div`
visibility: ${(props) => (props.$visible ? 'visible' : 'hidden')};
`;
export const Test2 = styled.div``;

export const StyledCros = styled.button`
background-color: transparent;
border: none;
outline: transparent;
transition: all 0.5s ease;
cursor: pointer;
&:hover {
transform: scale(1.05);
}
@media only screen and (min-width: 768px) {
top: 36px;
right: 24px;
}
@media only screen and (min-width: 1280px) {
top: 36px;
right: 24px;
}
`;
export const Test3 = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
`;

0 comments on commit a494784

Please sign in to comment.