Skip to content

Commit

Permalink
Refactor/create direct chat css (#3021)
Browse files Browse the repository at this point in the history
* refactor CreateDirectChat inline css to app.module.css

* deleted CreateDirectChat.module.css
  • Loading branch information
Dhiren-Mhatre authored Dec 29, 2024
1 parent 2e2e8ef commit f4830d0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.

This file was deleted.

11 changes: 7 additions & 4 deletions src/components/UserPortal/CreateDirectChat/CreateDirectChat.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Paper, TableBody } from '@mui/material';
import React, { useState } from 'react';
import { Button, Form, Modal } from 'react-bootstrap';
import styles from './CreateDirectChat.module.css';
import type { ApolloQueryResult } from '@apollo/client';
import { useMutation, useQuery } from '@apollo/client';
import useLocalStorage from 'utils/useLocalstorage';
Expand All @@ -18,6 +17,7 @@ import Loader from 'components/Loader/Loader';
import { Search } from '@mui/icons-material';
import { useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import styles from '../../../style/app.module.css';

interface InterfaceCreateDirectChatProps {
toggleCreateDirectChatModal: () => void;
Expand Down Expand Up @@ -129,7 +129,7 @@ export default function createDirectChatModal({
</>
) : (
<>
<div className={styles.input}>
<div className={styles.inputContainer}>
<Form onSubmit={handleUserModalSearchChange}>
<Form.Control
type="name"
Expand All @@ -147,13 +147,16 @@ export default function createDirectChatModal({
<Button
type="submit"
data-testid="submitBtn"
className={`position-absolute z-10 bottom-10 end-0 d-flex justify-content-center align-items-center `}
className={styles.submitBtn}
>
<Search />
</Button>
</Form>
</div>
<TableContainer className={styles.userData} component={Paper}>
<TableContainer
className={styles.tableContainer}
component={Paper}
>
<Table aria-label="customized table">
<TableHead>
<TableRow>
Expand Down
33 changes: 33 additions & 0 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4019,3 +4019,36 @@ button[data-testid='createPostBtn'] {
box-shadow: 0 4px 6px var(--grey-border-box-color);
}
}

/* CreateDirectChat.tsx */

.modalContent {
width: 530px;
}

.inputContainer {
position: relative;
margin-bottom: 16px;
}

.inputFieldModal {
padding-right: 40px;
width: 100%;
border-radius: 4px;
border: 1px solid #ced4da;
}

.submitBtn {
position: absolute;
z-index: 10;
bottom: 10px;
right: 0px;
display: flex;
justify-content: center;
align-items: center;
}
.tableContainer {
height: 400px;
overflow-y: scroll;
overflow-x: hidden;
}

0 comments on commit f4830d0

Please sign in to comment.