feat(client): menu styling

This commit is contained in:
chenos 2022-03-09 21:11:40 +08:00
parent 4faf19d8eb
commit 97ad82fcdc
2 changed files with 18 additions and 4 deletions

View File

@ -34,7 +34,18 @@ const InternalAdminLayout = (props: any) => {
const result = useSystemSettings();
return (
<Layout>
<Layout.Header style={{ height: 46, lineHeight: '46px', position: 'relative', paddingLeft: 0 }}>
<Layout.Header
className={css`
.ant-menu.ant-menu-dark .ant-menu-item-selected,
.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected {
background-color: rgba(255, 255, 255, 0.1);
}
.ant-menu-dark.ant-menu-horizontal > .ant-menu-item:hover {
background-color: rgba(255, 255, 255, 0.1);
}
`}
style={{ height: 46, lineHeight: '46px', position: 'relative', paddingLeft: 0 }}
>
<div style={{ display: 'flex', height: '100%' }}>
<div style={{ width: 200, display: 'inline-flex', color: '#fff', padding: '0', alignItems: 'center' }}>
<img

View File

@ -1,17 +1,20 @@
import React from 'react';
import { Button, Menu } from 'antd';
import { HighlightOutlined } from '@ant-design/icons';
import cls from 'classnames';
import React from 'react';
import { useDesignable } from '..';
import { PluginManager } from '../../plugin-manager';
export const DesignableSwitch = () => {
const { designable, setDesignable } = useDesignable();
const style = {};
if (designable) {
style['backgroundColor'] = '#f18b62';
}
return (
<PluginManager.Toolbar.Item
selected={designable}
icon={<HighlightOutlined />}
title={'界面配置'}
style={style}
onClick={() => {
setDesignable(!designable);
}}