style(mobile): fix top-right corner style

This commit is contained in:
Zeke Zhang 2025-04-10 22:45:17 +08:00
parent 5852901b19
commit 9ab6f7a956
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}}

View File

@ -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 });