diff --git a/web/src/components/ExpandableElement/ExpandableElement.module.scss b/web/src/components/ExpandableElement/ExpandableElement.module.scss deleted file mode 100644 index 1ecf5ddb..00000000 --- a/web/src/components/ExpandableElement/ExpandableElement.module.scss +++ /dev/null @@ -1,74 +0,0 @@ -@import 'src/styles/colors'; - -.title { - line-height: 32px; - margin-bottom: 3px; -} - -.container { - position: relative; - display: flex; - flex-direction: column; - flex: 1; - transition: all 0.2s; - overflow-x: auto; - - &:hover .expandButton { - opacity: 1; - } - - &:nth-child(even) { - background-color: $base-surface-color; - } - - &:nth-child(odd) { - background-color: $base-light-color; - } -} - -.content { - flex: 1; - padding: 20px; - overflow-y: auto; -} - -.boxHeader { - position: relative; -} - -.expandButton { - position: absolute; - right: -20px; - top: 50%; - transform: translate(0px, -50%); - background-color: $primary-color; - color: $base-light-color; - font-size: 12px; - line-height: 1; - padding: 4px 18px 4px 8px; - border-radius: 1px 0px 0px 1px; - cursor: pointer; - opacity: 0; - transition: all 0.2s; - - &::after { - content: ''; - position: absolute; - width: 4px; - height: 4px; - top: calc(50% - 1px); - transform: rotate(45deg) translate(0px, -50%); - right: 8px; - border-top: 2px solid $base-light-color; - border-right: 2px solid $base-light-color; - } -} - -.expanded { - &::after { - border-top: 0px solid $base-light-color; - border-right: 0px solid $base-light-color; - border-bottom: 2px solid $base-light-color; - border-left: 2px solid $base-light-color; - } -} diff --git a/web/src/components/ExpandableElement/index.tsx b/web/src/components/ExpandableElement/index.tsx deleted file mode 100644 index d5d8716b..00000000 --- a/web/src/components/ExpandableElement/index.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import classNames from 'classnames'; -import { useRef, useState } from 'react'; - -import s from './ExpandableElement.module.scss'; - -interface ExpandableElementProps extends React.HTMLAttributes { - title?: string; -} - -export function ExpandableElement({ title, className, children }: ExpandableElementProps) { - const [expanded, setExpanded] = useState(false); - const headerRef = useRef(null); - - return ( -
-
-
-

{title}

- {expanded ? ( -
{ - if (e.target === headerRef.current) { - setExpanded((f) => !f); - } - }} - > - {expanded ? 'collapse' : 'expand'} -
- ) : ( -
{ - if (e.target === headerRef.current) { - setExpanded((f) => !f); - } - }} - > - {expanded ? 'collapse' : 'expand'} -
- )} -
- {children} -
-
- ); -} diff --git a/web/src/components/ExpandableRow/ExpandableRow.module.scss b/web/src/components/ExpandableRow/ExpandableRow.module.scss deleted file mode 100644 index a7964a91..00000000 --- a/web/src/components/ExpandableRow/ExpandableRow.module.scss +++ /dev/null @@ -1,16 +0,0 @@ -.arrow { - position: absolute; - left: 0; - cursor: pointer; - z-index: 1; - padding: 0; - margin: 0; - background: 0; - outline: none; - border: 0; - height: 24px; - width: 24px; - display: flex; - justify-content: center; - align-items: center; -} diff --git a/web/src/components/ExpandableRow/index.tsx b/web/src/components/ExpandableRow/index.tsx deleted file mode 100644 index 544751b8..00000000 --- a/web/src/components/ExpandableRow/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { useState } from 'react'; - -import s from './ExpandableRow.module.scss'; -import { Arrow } from '../Icon/Arrow'; - -interface Props extends React.HTMLAttributes {} - -export function ExpandableRow(props: Props) { - const { className, children } = props; - const [expanded, setExpanded] = useState(false); - - return ( -
- - {children} -
- ); -}