refactor: remove component subfolders (#184)

(and unused components)
This commit is contained in:
Razboy20
2024-03-21 13:47:59 -05:00
committed by GitHub
parent efed1c0edb
commit e080e93faa
56 changed files with 70 additions and 275 deletions

View File

@@ -1,10 +0,0 @@
@use 'src/views/styles/colors.module.scss';
.card {
background: colors.$white;
border: 0.5px dotted #c3cee0;
box-sizing: border-box;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}

View File

@@ -1,31 +0,0 @@
import clsx from 'clsx';
import React from 'react';
import styles from './Card.module.scss';
/**
* Props for the Card component.
*/
export type Props = {
style?: React.CSSProperties;
className?: string;
onClick?: (...args: unknown[]) => void;
children?: React.ReactNode;
testId?: string;
};
/**
* A reusable Card component that can be used to wrap other components
*/
export default function Card(props: Props) {
return (
<div
style={props.style}
className={clsx(styles.card, props.className)}
onClick={props.onClick}
data-testid={props.testId}
>
{props.children}
</div>
);
}

View File

@@ -4,7 +4,7 @@ import clsx from 'clsx';
import type { PropsWithChildren } from 'react';
import React, { Fragment } from 'react';
import ExtensionRoot from '../ExtensionRoot/ExtensionRoot';
import ExtensionRoot from './ExtensionRoot/ExtensionRoot';
export interface _DialogProps {
className?: string;

View File

@@ -3,7 +3,7 @@ import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';
import type { ReactElement } from 'react';
import React, { useCallback, useEffect, useState } from 'react';
import ExtensionRoot from '../ExtensionRoot/ExtensionRoot';
import ExtensionRoot from './ExtensionRoot/ExtensionRoot';
/*
* Ctrl + f dragHandleProps on PopupCourseBlock.tsx for example implementation of drag handle (two lines of code)

View File

@@ -2,8 +2,8 @@ import { Dialog, Transition } from '@headlessui/react';
import type { ReactElement } from 'react';
import React from 'react';
import type { Button } from '../Button/Button';
import type Text from '../Text/Text';
import type { Button } from './Button';
import type Text from './Text/Text';
/**
* Props for the PromptDialog component.