diff --git a/src/components/Card.tsx b/src/components/Card.tsx
new file mode 100644
index 0000000..30cf141
--- /dev/null
+++ b/src/components/Card.tsx
@@ -0,0 +1,77 @@
+import { createStyles, makeStyles, Theme, Typography } from '@material-ui/core'
+import { ReactElement } from 'react'
+import { AlertCircle, Check } from 'react-feather'
+import { SwarmButton, SwarmButtonProps } from './SwarmButton'
+
+interface Props {
+ icon: ReactElement
+ title: string
+ subtitle: string
+ buttonProps: SwarmButtonProps
+ status: 'ok' | 'error'
+}
+
+const useStyles = (backgroundColor: string) =>
+ makeStyles((theme: Theme) =>
+ createStyles({
+ root: {
+ flexGrow: 1,
+ flexBasis: '100px',
+ },
+ wrapper: {
+ backgroundColor,
+ padding: '16px',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ textAlign: 'center',
+ },
+ iconWrapper: {
+ display: 'flex',
+ alignItems: 'flex-start',
+ marginBottom: '18px',
+ },
+ button: {
+ width: '100%',
+ marginTop: '2px',
+ backgroundColor,
+ '&:hover': {
+ backgroundColor: theme.palette.primary.main,
+ color: 'white',
+ boxShadow: 'none',
+ // https://github.com/mui-org/material-ui/issues/22543
+ '@media (hover: none)': {
+ backgroundColor: theme.palette.primary.main,
+ color: 'white',
+ boxShadow: 'none',
+ },
+ },
+ },
+ }),
+ )
+
+export default function Card({ buttonProps, icon, title, subtitle, status }: Props): ReactElement {
+ const backgroundColor = status === 'error' ? 'white' : '#f3f3f3'
+ const { className, ...rest } = buttonProps
+ const classes = useStyles(backgroundColor)()
+
+ return (
+
+
+
+ {icon}
+ {status === 'ok' ? (
+
+ ) : (
+
+ )}
+
+
+ {title}
+
+
{subtitle}
+
+
+
+ )
+}
diff --git a/src/components/Map.tsx b/src/components/Map.tsx
new file mode 100644
index 0000000..30b661b
--- /dev/null
+++ b/src/components/Map.tsx
@@ -0,0 +1,9 @@
+import { ReactElement, CSSProperties } from 'react'
+
+interface Props {
+ style?: CSSProperties
+}
+
+export default function Card({ style }: Props): ReactElement {
+ return
+}
diff --git a/src/components/SwarmButton.tsx b/src/components/SwarmButton.tsx
index 84bb5e0..46976b3 100644
--- a/src/components/SwarmButton.tsx
+++ b/src/components/SwarmButton.tsx
@@ -1,13 +1,9 @@
-import { Button, CircularProgress, createStyles, makeStyles } from '@material-ui/core'
+import { Button, ButtonProps, CircularProgress, createStyles, makeStyles } from '@material-ui/core'
import React, { ReactElement } from 'react'
import { IconProps } from 'react-feather'
-interface Props {
- onClick: () => void
+export interface SwarmButtonProps extends ButtonProps {
iconType: React.ComponentType
- children: string
- className?: string
- disabled?: boolean
loading?: boolean
cancel?: boolean
variant?: 'text' | 'contained' | 'outlined'
@@ -51,7 +47,9 @@ export function SwarmButton({
loading,
cancel,
variant = 'contained',
-}: Props): ReactElement {
+ style,
+ ...other
+}: SwarmButtonProps): ReactElement {
const classes = useStyles()
function getIconColor() {
@@ -73,14 +71,18 @@ export function SwarmButton({
return (