-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
92 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { InboxOutlined } from '@ant-design/icons'; | ||
import React from 'react'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import { useStyles } from './style'; | ||
|
||
interface EmptyGuideProps { | ||
extra?: string; | ||
size: { height: number; width: number }; | ||
} | ||
|
||
const EmptyGuide = (props: EmptyGuideProps) => { | ||
const { styles } = useStyles(); | ||
const { size, extra } = props; | ||
|
||
return ( | ||
<Flexbox | ||
className={styles.guide} | ||
align="center" | ||
justify={'center'} | ||
style={{ height: size.height, width: size.width }} | ||
> | ||
<InboxOutlined className={styles.icon} /> | ||
<p className={styles.info}>点击或拖拽文件到此区域上传</p> | ||
{extra ? <p className={styles.extra}>{extra}</p> : null} | ||
</Flexbox> | ||
); | ||
}; | ||
|
||
export default EmptyGuide; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { createStyles } from 'antd-style'; | ||
|
||
export const useStyles = createStyles(({ css, token }) => ({ | ||
guide: css` | ||
cursor: pointer; | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
border: 1px dashed ${token.colorBorder}; | ||
border-radius: ${token.borderRadius}px; | ||
`, | ||
icon: css` | ||
font-size: 48px; | ||
color: ${token.geekblue}; | ||
`, | ||
info: css``, | ||
extra: css` | ||
font-size: 12px; | ||
color: ${token.colorTextDescription}; | ||
`, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters