Browse Source

Removed file chooser component folder

Nidhi Bhat G 3 năm trước cách đây
mục cha
commit
b8155fff5e

+ 0 - 6
desktop/core/src/desktop/js/reactComponents/FileChooserComponent/FileChooserComponentButton/FileChooserComponentButton.scss

@@ -1,6 +0,0 @@
-.ant-btn-primary {
-  background-color: #0b7fad;
-  color: white;
-  margin-left: 40px;
-  margin-top: 12px;
-}

+ 0 - 10
desktop/core/src/desktop/js/reactComponents/FileChooserComponent/FileChooserComponentButton/FileChooserComponentButton.test.tsx

@@ -1,10 +0,0 @@
-import { render, fireEvent, waitFor } from '@testing-library/react';
-import '@testing-library/jest-dom';
-import React from 'react';
-import FileChooserComponentButton from './FileChooserComponentButton';
-
-test('Filechooser modal opens on button click', async () => {
-  const { queryByText } = render(<FileChooserComponentButton />);
-  fireEvent.click(queryByText('File chooser component'));
-  await waitFor(() => expect(queryByText('Choose a file')).toBeInTheDocument());
-});

+ 0 - 19
desktop/core/src/desktop/js/reactComponents/FileChooserComponent/FileChooserComponentButton/FileChooserComponentButton.tsx

@@ -1,19 +0,0 @@
-import React, { useState } from 'react';
-import './FileChooserComponentButton.scss';
-import FileChooserModal from '../FileChooserModal/FileChooserModal';
-import { Button } from 'antd';
-
-const FileChooserComponentButton = (): JSX.Element => {
-  const [show, setShow] = useState(false);
-
-  return (
-    <div>
-      <Button type="primary" onClick={() => setShow(true)}>
-        File chooser component
-      </Button>
-      <FileChooserModal onClose={() => setShow(false)} show={show} />
-    </div>
-  );
-};
-
-export default FileChooserComponentButton;

+ 0 - 27
desktop/core/src/desktop/js/reactComponents/FileChooserComponent/FileChooserModal/FileChooserModal.tsx

@@ -1,27 +0,0 @@
-import React from 'react';
-import Modal from 'antd/lib/modal/Modal';
-
-interface FileProps {
-  show: boolean;
-  onClose: () => void;
-}
-
-const FileChooserModal: React.FC<FileProps> = ({ show, onClose }) => {
-  const handleOk = () => {
-    onClose();
-  };
-  const handleCancel = () => {
-    onClose();
-  };
-  return (
-    <Modal
-      title="Choose a file"
-      open={show}
-      onOk={handleOk}
-      onCancel={handleCancel}
-      okText="Select"
-    ></Modal>
-  );
-};
-
-export default FileChooserModal;