Skip to content

Commit

Permalink
#2883 Refactor CSS files in miscellaneous components (#3116)
Browse files Browse the repository at this point in the history
* src/components/UpdateSession/UpdateSession.css

* src/components/UserListCard/UserListCard.module.css

* Refactor src/components/UserPasswordUpdate/UserPasswordUpdate.module.css

* src/components/Venues/VenueModal.module.css

* src/components/EventCalendar/YearlyEventCalender.module.css

* Refactor src/components/AgendaItems/AgendaItemsContainer.module.css

* Refactor src/components/AddOn/core/AddOnStore/AddOnStore.module.css

* Refactor src/components/Advertisements/Advertisements.module.css

* Refactor src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css

* Refactor src/components/EventCalendar/EventCalendar.module.css

* Refactor src/components/EventListCard/EventListCard.module.css

* Refactor CSS OrgPostCard.module.css && fixed eslint destructuring props error

* Refactor src/components/OrgSettings/ActionItemCategories/OrgActionItemCategories.module.css

* CSS fix

* consolidating button styles in greenregbtnUserPasswordUpdate

* CSS bugfixes

* Replaced hardcoded color values to CSS variables

* removed role from .calendar__weekdays and .calendar__days

* refactor: extract DeletePostModal from OrgPostCard to fix file-length test

* TSDoc added for src/components/OrgPostCard/DeletePostModal.tsx

* removed duplicate cursor property
  • Loading branch information
pranavnathe authored Jan 5, 2025
1 parent 1104967 commit 4548d9d
Show file tree
Hide file tree
Showing 36 changed files with 1,862 additions and 2,508 deletions.
72 changes: 0 additions & 72 deletions src/components/AddOn/core/AddOnStore/AddOnStore.module.css

This file was deleted.

35 changes: 9 additions & 26 deletions src/components/AddOn/core/AddOnStore/AddOnStore.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import styles from './AddOnStore.module.css';
import styles from '../../../../style/app.module.css';
import AddOnEntry from '../AddOnEntry/AddOnEntry';
import { useQuery } from '@apollo/client';
import { PLUGIN_GET } from 'GraphQl/Queries/Queries'; // PLUGIN_LIST
Expand Down Expand Up @@ -122,36 +122,19 @@ function addOnStore(): JSX.Element {

return (
<>
<Row
className=""
style={{
backgroundColor: 'white',
margin: '2px',
padding: '10px',
borderRadius: '20px',
}}
>
<Col
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
}}
>
<div className={styles.input}>
<Row className={styles.containerAddOnStore}>
<Col className={styles.colAddOnStore}>
<div className={styles.inputAddOnStore}>
<Form.Control
type="name"
id="searchname"
className={styles.actioninput}
className={styles.inputField}
placeholder={t('searchName')}
autoComplete="off"
required
onChange={(e): void => setSearchText(e.target.value)}
/>
<Button
className={`position-absolute z-10 bottom-0 end-0 d-flex justify-content-center align-items-center `}
style={{ marginBottom: '10px' }}
>
<Button className={styles.searchButton}>
<Search />
</Button>
</div>
Expand Down Expand Up @@ -199,7 +182,7 @@ function addOnStore(): JSX.Element {
title={t('available')}
style={{ backgroundColor: 'white' }}
>
<div className={styles.justifysp}>
<div className={styles.justifyspAddOnStore}>
{(() => {
const filteredPlugins = filterPlugins(
data?.getPlugins || [],
Expand All @@ -211,7 +194,7 @@ function addOnStore(): JSX.Element {
}

return (
<div className={styles.justifysp}>
<div className={styles.justifyspAddOnStore}>
{filteredPlugins.map((plug, i) => (
<div className={styles.cardGridItem} key={i}>
<AddOnEntry
Expand All @@ -236,7 +219,7 @@ function addOnStore(): JSX.Element {
title={t('install')}
data-testid="installed-tab"
>
<div className={styles.justifysp}>
<div className={styles.justifyspAddOnStore}>
{(() => {
const installedPlugins = (data?.getPlugins || []).filter(
(plugin) => !plugin.uninstalledOrgs.includes(orgId ?? ''),
Expand Down
47 changes: 0 additions & 47 deletions src/components/Advertisements/Advertisements.module.css

This file was deleted.

27 changes: 9 additions & 18 deletions src/components/Advertisements/Advertisements.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import styles from './Advertisements.module.css';
import styles from '../../style/app.module.css';
import { useQuery } from '@apollo/client';
import { ORGANIZATION_ADVERTISEMENT_LIST } from 'GraphQl/Queries/Queries';
import { Button, Col, Form, Row, Tab, Tabs } from 'react-bootstrap';
Expand Down Expand Up @@ -79,29 +79,20 @@ export default function advertisements(): JSX.Element {
return (
<>
<Row data-testid="advertisements">
<Col col={8} style={{ backgroundColor: 'white', borderRadius: '20px' }}>
<div className={styles.justifysp}>
<Col
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px',
}}
>
<div className={styles.input}>
<Col col={8} className={styles.containerAdvertisements}>
<div className={styles.justifyspAdvertisements}>
<Col className={styles.colAdvertisements}>
<div className={styles.inputAdvertisements}>
<Form.Control
type="name"
id="searchname"
className={styles.actioninput}
className={styles.inputField}
placeholder={'Search..'}
autoComplete="off"
required
// onChange={(e): void => setSearchText("search")}
/>
<Button
className={`position-absolute z-10 bottom-0 end-0 d-flex justify-content-center align-items-center `}
>
<Button className={styles.searchButton}>
<Search />
</Button>
</div>
Expand Down Expand Up @@ -145,7 +136,7 @@ export default function advertisements(): JSX.Element {
orgAdvertisementListData?.organizations[0].advertisements
.pageInfo.hasNextPage ?? false
}
className={styles.listBox}
className={styles.listBoxAdvertisements}
data-testid="organizations-list"
endMessage={
advertisements.filter(
Expand Down Expand Up @@ -221,7 +212,7 @@ export default function advertisements(): JSX.Element {
orgAdvertisementListData?.organizations[0].advertisements
.pageInfo.hasNextPage ?? false
}
className={styles.listBox}
className={styles.listBoxAdvertisements}
data-testid="organizations-list"
endMessage={
advertisements.filter(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ function advertisementRegister({
}}
/>
{formState.advertisementMedia && (
<div className={styles.preview} data-testid="mediaPreview">
<div
className={styles.previewAdvertisementRegister}
data-testid="mediaPreview"
>
{formState.advertisementMedia.includes('video') ? (
<video
muted
Expand All @@ -332,7 +335,7 @@ function advertisementRegister({
<img src={formState.advertisementMedia} />
)}
<button
className={styles.closeButton}
className={styles.closeButtonAdvertisementRegister}
onClick={(e): void => {
e.preventDefault();
setFormState({
Expand Down Expand Up @@ -405,7 +408,7 @@ function advertisementRegister({
<Button
variant="secondary"
onClick={handleClose}
className={styles.closeButton}
className={styles.closeButtonAdvertisementRegister}
data-testid="addonclose"
>
{tCommon('close')}
Expand Down
Loading

0 comments on commit 4548d9d

Please sign in to comment.