Skip to content

Commit

Permalink
💄 style: update empty style
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jun 13, 2023
1 parent c88698a commit e770ecb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/ProEditor/components/AssetEmpty/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Empty } from 'antd';
import type { FC } from 'react';
import { memo } from 'react';
import { Center } from 'react-layout-kit';

import { createStyles } from '../../../theme';

import { useStore } from '../../store';
Expand All @@ -21,9 +23,9 @@ const AssetEmpty: FC = memo(() => {
const { styles } = useStyles(prefixCls);

return (
<div className={styles.cls}>
<Center className={styles.cls}>
<Empty description={'未找到 ComponentAsset,请在 props 中传入 ComponentAsset'} />
</div>
</Center>
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/ProEditor/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { useStyle } from './style';
export type ProEditorProps = ProEditorAppProps & AppContainerProps & StoreUpdaterProps;

export const ProEditor: FC<ProEditorProps> = memo((props) => {
const { themeMode, theme, showEditorDevtools, editorRef, ...res } = props;
const { themeMode, theme, style, showEditorDevtools, editorRef, ...res } = props;
const { styles } = useStyle();

return (
<Provider showDevtools={showEditorDevtools}>
<AppContainer themeMode={themeMode} theme={theme}>
<App className={styles.app}>
<App className={styles.app} style={style}>
<Content {...res} />
</App>
</AppContainer>
Expand Down
8 changes: 4 additions & 4 deletions src/ProEditor/demos/empty.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* height: "100%"
* */
/**
* iframe: 300
*/
import { ProEditor } from '@ant-design/pro-editor';

export default () => <ProEditor />;
export default () => <ProEditor style={{ height: '100vh' }} />;

0 comments on commit e770ecb

Please sign in to comment.