1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

#23 fixed Tabs

This commit is contained in:
Fedor Katurov 2021-03-19 18:11:04 +07:00
parent 40f881fdad
commit bee41ebfb3
3 changed files with 16 additions and 33 deletions

View file

@ -4,6 +4,5 @@
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin: $gap * 2 0 0 0;
padding: 0 $gap;
padding: 0 $gap / 2;
}

View file

@ -21,20 +21,22 @@ const ProfileTabs: FC<IProps> = ({ tab, is_own, setTab }) => {
);
return (
<Tabs>
<Tab active={tab === 'profile'} onClick={changeTab('profile')}>
Профиль
</Tab>
<Tab active={tab === 'messages'} onClick={changeTab('messages')}>
Сообщения
</Tab>
{is_own && (
<Tab active={tab === 'settings'} onClick={changeTab('settings')}>
Настройки
<div className={styles.wrap}>
<Tabs>
<Tab active={tab === 'profile'} onClick={changeTab('profile')}>
Профиль
</Tab>
)}
</Tabs>
<Tab active={tab === 'messages'} onClick={changeTab('messages')}>
Сообщения
</Tab>
{is_own && (
<Tab active={tab === 'settings'} onClick={changeTab('settings')}>
Настройки
</Tab>
)}
</Tabs>
</div>
);
};

View file

@ -1,24 +1,6 @@
@import "src/styles/variables";
.wrap {
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin: $gap * 2 0 0 0;
padding: 0 $gap;
}
.tab {
@include outer_shadow();
padding: $gap;
margin-right: $gap;
border-radius: $radius $radius 0 0;
font: $font_14_semibold;
text-transform: uppercase;
cursor: pointer;
&.active {
background: lighten($content_bg, 4%);
}
}