From 718e654f24defbfee016d15a8f517f4264880a00 Mon Sep 17 00:00:00 2001 From: Josue Date: Thu, 8 Apr 2021 11:19:08 -0400 Subject: [PATCH] refactor: remove components used in demo without MUI --- .../components/{organisms => }/Header.tsx | 2 +- striker-ui/components/atoms/Button.tsx | 106 ------------------ striker-ui/components/atoms/Label.tsx | 24 ---- striker-ui/components/atoms/SimpleLink.tsx | 20 ---- striker-ui/components/atoms/ToggleSwitch.tsx | 86 -------------- striker-ui/components/molecules/List.tsx | 64 ----------- .../organisms/PageCenterContainer.tsx | 22 ---- .../components/organisms/PageContainer.tsx | 16 --- 8 files changed, 1 insertion(+), 339 deletions(-) rename striker-ui/components/{organisms => }/Header.tsx (95%) delete mode 100644 striker-ui/components/atoms/Button.tsx delete mode 100644 striker-ui/components/atoms/Label.tsx delete mode 100644 striker-ui/components/atoms/SimpleLink.tsx delete mode 100644 striker-ui/components/atoms/ToggleSwitch.tsx delete mode 100644 striker-ui/components/molecules/List.tsx delete mode 100644 striker-ui/components/organisms/PageCenterContainer.tsx delete mode 100644 striker-ui/components/organisms/PageContainer.tsx diff --git a/striker-ui/components/organisms/Header.tsx b/striker-ui/components/Header.tsx similarity index 95% rename from striker-ui/components/organisms/Header.tsx rename to striker-ui/components/Header.tsx index 80a5c093..44dc5181 100644 --- a/striker-ui/components/organisms/Header.tsx +++ b/striker-ui/components/Header.tsx @@ -2,7 +2,7 @@ import AppBar from '@material-ui/core/AppBar'; import { makeStyles, createStyles } from '@material-ui/core/styles'; import { Grid } from '@material-ui/core'; import Image from 'next/image'; -import { ICONS, ICON_SIZE } from '../../lib/consts/ICONS'; +import { ICONS, ICON_SIZE } from '../lib/consts/ICONS'; const useStyles = makeStyles((theme) => createStyles({ diff --git a/striker-ui/components/atoms/Button.tsx b/striker-ui/components/atoms/Button.tsx deleted file mode 100644 index ff107d54..00000000 --- a/striker-ui/components/atoms/Button.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { FunctionComponent } from 'react'; -import Image from 'next/image'; -import Link from 'next/link'; -import styled from 'styled-components'; - -import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; - -import { ButtonImageProps } from '../../types/ButtonImageProps'; -import { ButtonProps } from '../../types/ButtonProps'; -import Label from './Label'; - -const DEFAULT_BUTTON_IMAGE_SIZE = 30; - -const StyledButton = styled.button` - display: flex; - - flex-direction: row; - flex-wrap: nowrap; -`; - -const StyledSeparator = styled.div` - margin-right: 0.5em; -`; - -StyledButton.defaultProps = { - theme: DEFAULT_THEME, -}; - -const getButtonImageElement: ( - imageProps?: ButtonImageProps, -) => JSX.Element | undefined = (imageProps) => { - let imageElement: JSX.Element | undefined; - - if (imageProps) { - const { - src, - width = DEFAULT_BUTTON_IMAGE_SIZE, - height = DEFAULT_BUTTON_IMAGE_SIZE, - } = imageProps; - - imageElement = ; - } - - return imageElement; -}; - -const getButtonLabelElement: ( - labelProps?: LabelProps, -) => JSX.Element | undefined = (labelProps) => { - let labelElement: JSX.Element | undefined; - - if (labelProps) { - const { text } = labelProps; - - labelElement =