From 0e36e141c19939d673b796b8982e6bec961fecf5 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Wed, 21 Dec 2022 10:54:51 +0800 Subject: [PATCH] feat: add empty svg component --- packages/app/src/ui/empty/empty.tsx | 20 ++++++ packages/app/src/ui/empty/emptyPage.svg | 20 ++++++ packages/app/src/ui/empty/emptySVG.tsx | 87 +++++++++++++++++++++++++ packages/app/src/ui/empty/index.ts | 1 + 4 files changed, 128 insertions(+) create mode 100644 packages/app/src/ui/empty/empty.tsx create mode 100644 packages/app/src/ui/empty/emptyPage.svg create mode 100644 packages/app/src/ui/empty/emptySVG.tsx create mode 100644 packages/app/src/ui/empty/index.ts diff --git a/packages/app/src/ui/empty/empty.tsx b/packages/app/src/ui/empty/empty.tsx new file mode 100644 index 0000000000..ec6cc1607b --- /dev/null +++ b/packages/app/src/ui/empty/empty.tsx @@ -0,0 +1,20 @@ +import React, { CSSProperties } from 'react'; +import { EmptySVG } from './emptySVG'; +import { styled } from '@/styles'; + +export type ContentProps = { + width?: CSSProperties['width']; + height?: CSSProperties['height']; + fontSize?: CSSProperties['fontSize']; +}; +export const Empty = styled(EmptySVG)( + ({ theme, fontSize, width, height }) => { + return { + width, + height, + fontSize, + }; + } +); + +export default Empty; diff --git a/packages/app/src/ui/empty/emptyPage.svg b/packages/app/src/ui/empty/emptyPage.svg new file mode 100644 index 0000000000..e5a4f4b32f --- /dev/null +++ b/packages/app/src/ui/empty/emptyPage.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/app/src/ui/empty/emptySVG.tsx b/packages/app/src/ui/empty/emptySVG.tsx new file mode 100644 index 0000000000..3db455a137 --- /dev/null +++ b/packages/app/src/ui/empty/emptySVG.tsx @@ -0,0 +1,87 @@ +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + +export const EmptySVG = (props: SvgIconProps) => { + return ( + + + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/packages/app/src/ui/empty/index.ts b/packages/app/src/ui/empty/index.ts new file mode 100644 index 0000000000..b0a7bdc7cc --- /dev/null +++ b/packages/app/src/ui/empty/index.ts @@ -0,0 +1 @@ +export * from './empty';