mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
style(mobile): fix top-right corner style
This commit is contained in:
parent
5852901b19
commit
9ab6f7a956
@ -9,7 +9,7 @@
|
||||
|
||||
import { HighlightOutlined } from '@ant-design/icons';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import React from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDesignable } from '..';
|
||||
@ -24,7 +24,7 @@ const unDesignableStyle = {
|
||||
backgroundColor: 'transparent',
|
||||
};
|
||||
|
||||
export const DesignableSwitch = () => {
|
||||
export const DesignableSwitch: FC<{ style?: React.CSSProperties }> = (props) => {
|
||||
const { designable, setDesignable } = useDesignable();
|
||||
const { t } = useTranslation();
|
||||
const { token } = useToken();
|
||||
@ -46,7 +46,7 @@ export const DesignableSwitch = () => {
|
||||
icon={<HighlightOutlined style={{ color: token.colorTextHeaderMenu }} />}
|
||||
title={t('UI Editor')}
|
||||
// subtitle={'Ctrl+Shift+U'}
|
||||
style={style}
|
||||
style={{ ...style, ...props.style }}
|
||||
onClick={() => {
|
||||
setDesignable(!designable);
|
||||
}}
|
||||
|
@ -98,8 +98,8 @@ export const DesktopModeHeader: FC = () => {
|
||||
<Button style={{ color: 'white' }} href={app.getHref('/admin')}>
|
||||
{t('Back')}
|
||||
</Button>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
{allowConfigUI ? <DesignableSwitch /> : null}
|
||||
<div style={{ display: 'flex', alignItems: 'center', lineHeight: 1 }}>
|
||||
{allowConfigUI ? <DesignableSwitch style={{ fontSize: 16 }} /> : null}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setSize({ width: 768, height: 667 });
|
||||
|
Loading…
x
Reference in New Issue
Block a user