Cleanup unused packages, modules and files

This commit is contained in:
Justin Edmund 2022-03-22 00:29:41 -07:00
parent ccc98e2d1a
commit ef6ea9b415
8 changed files with 0 additions and 1211 deletions

View file

@ -1,81 +0,0 @@
.ModalContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
.Modal {
background: #f5f5f5;
border-radius: $unit;
color: $grey-00;
display: flex;
flex-direction: column;
min-width: $unit * 45;
max-width: $unit * 60;
overflow-y: auto;
padding: $unit * 3;
position: relative;
z-index: 21;
#ModalHeader {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 16px;
margin-right: -8px;
h2 {
font-size: $font-xlarge;
font-weight: 500;
text-align: left;
flex-grow: 1;
}
svg {
fill: $grey-50;
padding: calc($unit / 2);
height: 18px;
width: 18px;
transform: rotate(45deg);
&:hover {
cursor: pointer;
fill: $grey-00;
}
}
}
#ModalBottom {
display: flex;
flex-direction: row;
a {
color: #666;
font-size: $font-regular;
font-weight: 500;
flex-grow: 1;
display: flex;
align-items: center;
}
.Button {
display: block;
min-height: $unit * 5;
text-align: center;
min-width: $unit * 11;
}
}
}
}

View file

@ -1,29 +0,0 @@
import React from 'react'
import classnames from 'classnames'
import './index.scss'
import PlusIcon from '~public/icons/Add.svg'
interface Props {
styleName?: string
title: string
close: () => void
}
class Modal extends React.Component<Props> {
render() {
return (
<div className="ModalContainer">
<div className={classnames("Modal", this.props.styleName)}>
<div id="ModalTop">
<h2>{this.props.title}</h2>
<PlusIcon onClick={this.props.close} />
</div>
{this.props.children}
</div>
</div>
)
}
}
export default Modal

View file

@ -1,12 +0,0 @@
// .Overlay {
// background: black;
// position: absolute;
// opacity: 0.28;
// height: 100%;
// width: 100%;
// top: 0;
// left: 0;
// }

View file

@ -1,13 +0,0 @@
import React from 'react'
import './index.scss'
interface Props {
onClick: OnClickEvent
}
const Overlay = (props: Props) => (
<div className="Overlay" onClick={props.onClick} />
)
export default Overlay

1035
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,6 @@
"@radix-ui/react-dialog": "^0.1.5",
"@radix-ui/react-dropdown-menu": "^0.1.6",
"@radix-ui/react-hover-card": "^0.1.5",
"@radix-ui/react-label": "^0.1.4",
"@radix-ui/react-switch": "^0.1.5",
"@radix-ui/react-toggle-group": "^0.1.5",
"@svgr/webpack": "^6.2.0",
@ -29,7 +28,6 @@
"meyer-reset-scss": "^2.0.4",
"next": "12.0.8",
"next-i18next": "^10.5.0",
"next-remote-watch": "^1.0.0",
"next-usequerystate": "^1.7.0",
"react": "17.0.2",
"react-cookie": "^4.1.1",

View file

@ -1,22 +0,0 @@
import React, { useEffect, useRef } from 'react'
import { createPortal } from 'react-dom'
const modalRoot = document.querySelector('#modal') as HTMLElement
const Portal: React.FC<{}> = ({ children }) => {
const modalContent = document.createElement('div')
modalContent.classList.add('modal_content')
const el = useRef(modalContent)
useEffect(() => {
const current = el.current
modalRoot!.appendChild(current)
return () => void modalRoot!.removeChild(current)
}, [])
return createPortal(children, el.current)
}
export default Portal

View file

@ -1,17 +0,0 @@
import { useState } from 'react'
export const useModal = () => {
const [open, onOpenModal] = useState(false)
const [close, onCloseModal] = useState(false)
const openModal = () => {
onOpenModal(true)
}
const closeModal = () => {
onCloseModal(true)
onOpenModal(false)
}
return { open, close, openModal, closeModal }
}