diff --git a/packages/core/src/components/EmptyState/EmptyStateImage.tsx b/packages/core/src/components/EmptyState/EmptyStateImage.tsx new file mode 100644 index 0000000000..08db0c4384 --- /dev/null +++ b/packages/core/src/components/EmptyState/EmptyStateImage.tsx @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import missingAnnotation from './assets/missingAnnotation.svg'; +import noInformation from './assets/noInformation.svg'; +import createComponent from './assets/createComponent.svg'; +import noBuild from './assets/noBuild.svg'; +import { makeStyles } from '@material-ui/core'; + +type Props = { + type: 'missingAnnotation' | 'noInformation' | 'createComponent' | 'noBuild'; +}; + +const useStyles = makeStyles(() => ({ + generalImg: { + width: '75%', + zIndex: 2, + position: 'absolute', + left: '50%', + top: '50%', + transform: 'translate(-50%, 15%)', + }, +})); + +export const EmptyStateImage = ({ type }: Props) => { + const classes = useStyles(); + switch (type) { + case 'missingAnnotation': + return ( + annotation is missing + ); + case 'noInformation': + return ( + no Information + ); + case 'createComponent': + return ( + create Component + ); + case 'noBuild': + return ( + no Build + ); + default: + return null; + } +}; diff --git a/packages/core/src/components/EmptyState/assets/Background.svg b/packages/core/src/components/EmptyState/assets/Background.svg new file mode 100644 index 0000000000..e2fa538f7f --- /dev/null +++ b/packages/core/src/components/EmptyState/assets/Background.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/packages/core/src/components/EmptyState/assets/createComponent.svg b/packages/core/src/components/EmptyState/assets/createComponent.svg new file mode 100644 index 0000000000..af2ddd5678 --- /dev/null +++ b/packages/core/src/components/EmptyState/assets/createComponent.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/core/src/components/EmptyState/assets/missingAnnotation.svg b/packages/core/src/components/EmptyState/assets/missingAnnotation.svg new file mode 100644 index 0000000000..475cda9699 --- /dev/null +++ b/packages/core/src/components/EmptyState/assets/missingAnnotation.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/core/src/components/EmptyState/assets/noBuild.svg b/packages/core/src/components/EmptyState/assets/noBuild.svg new file mode 100644 index 0000000000..76a41749b9 --- /dev/null +++ b/packages/core/src/components/EmptyState/assets/noBuild.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/core/src/components/EmptyState/assets/noInformation.svg b/packages/core/src/components/EmptyState/assets/noInformation.svg new file mode 100644 index 0000000000..e41cf94645 --- /dev/null +++ b/packages/core/src/components/EmptyState/assets/noInformation.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +