Skip to content

Commit ffa2a80

Browse files
author
k.golikov
committed
Improve styles
1 parent 1d69c68 commit ffa2a80

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.AppHeader__side-menu-drawer {
2+
.ant-drawer-header {
3+
&.ant-drawer-header-close-only {
4+
padding-right: 4px;
5+
}
6+
7+
.ant-drawer-header-title {
8+
justify-content: flex-end;
9+
}
10+
}
11+
}

src/layouts/appLayout/components/appHeader/AppHeader.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { routes } from '../../../../constants/router/routes';
88
import { Button, Col, Drawer, Space } from 'antd';
99
import AppMenu from '../appMenu/AppMenu';
1010
import { MenuOutlined } from '@ant-design/icons';
11+
import './AppHeader.scss';
12+
import classNames from 'classnames';
1113

1214
const drawerBodyStyle: CSSProperties = {
1315
padding: 1
@@ -18,6 +20,7 @@ const drawerHeaderStyle: CSSProperties = {
1820
};
1921

2022
const drawerContentWrapperStyle: CSSProperties = {
23+
width: '400px',
2124
maxWidth: '100vw'
2225
};
2326

@@ -38,7 +41,7 @@ const AppHeader = () => {
3841
placement="right"
3942
visible={isDrawerVisible}
4043
onClose={handleDrawerClose}
41-
className={styles.sideMenuDrawer}
44+
className={classNames(styles.sideMenuDrawer, 'AppHeader__side-menu-drawer')}
4245
bodyStyle={drawerBodyStyle}
4346
headerStyle={drawerHeaderStyle}
4447
contentWrapperStyle={drawerContentWrapperStyle}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.menu {
2-
height: 100%;
2+
min-height: 100%;
33
border-right: 0;
44
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@import "../../../../styles/main";
2+
3+
//.AppMenu {
4+
// @include themeDark {
5+
// .ant-menu-sub.ant-menu-inline {
6+
// background: #1d1d1d;
7+
// }
8+
// }
9+
//}

src/layouts/appLayout/components/appMenu/AppMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import menuItems from '../../../../constants/router/menuItems';
66
import { useLocation } from 'react-router-dom';
77
import useAppSettings from '../../../../hooks/useAppSettings';
88
import { ItemType } from 'antd/lib/menu/hooks/useItems';
9+
import classNames from 'classnames';
910

1011
interface Props {
1112
onItemSelect?: () => void;
@@ -22,7 +23,7 @@ const AppMenu: FunctionComponent<Props> = ({ onItemSelect }) => {
2223
return (
2324
<Menu
2425
mode="inline"
25-
className={styles.menu}
26+
className={classNames(styles.menu, 'AppMenu')}
2627
activeKey={pathname}
2728
selectedKeys={[pathname]}
2829
onSelect={onItemSelect}

src/layouts/appLayout/components/appSider/AppSider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import React from 'react';
22
import Sider from 'antd/lib/layout/Sider';
33
import AppMenu from '../appMenu/AppMenu';
44
import styles from './AppSider.module.scss';
5+
import classNames from 'classnames';
56

67
const AppSider = () => {
78
return (
8-
<Sider theme="light" className={styles.container} trigger={null}>
9+
<Sider theme="light" className={classNames(styles.container, 'AppSider')} trigger={null}>
910
<AppMenu />
1011
</Sider>
1112
);

0 commit comments

Comments
 (0)