Skip to content

Commit

Permalink
Figma: Refactor CSS files in src/components/CollapsibleDropdown #3330 (
Browse files Browse the repository at this point in the history
…#3473)

* Refactoring CollapsibleDropdown to import css from app.module

* Typo Fix - fixing directory file for sytle in CollapsibleDropdowm

* Test Fix: Pritter app.module
  • Loading branch information
Anushkaguptaaaa authored Jan 28, 2025
1 parent 2d47e89 commit 5477f18
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
14 changes: 0 additions & 14 deletions src/components/CollapsibleDropdown/CollapsibleDropdown.module.css

This file was deleted.

8 changes: 4 additions & 4 deletions src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import { Button, Collapse } from 'react-bootstrap';
import type { TargetsType } from 'state/reducers/routesReducer';
import styles from './CollapsibleDropdown.module.css';
import styles from '../../style/app.module.css';
import IconComponent from 'components/IconComponent/IconComponent';
import { NavLink, useLocation, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -48,7 +48,7 @@ const collapsibleDropdown = ({
aria-expanded={showDropdown}
data-testid="collapsible-dropdown"
>
<div className={styles.iconWrapper}>
<div className={styles.collapsibleDropdownIconWrapper}>
<IconComponent
name={name}
fill={showDropdown ? 'var(--bs-white)' : 'var(--bs-secondary)'}
Expand All @@ -73,15 +73,15 @@ const collapsibleDropdown = ({
key={name}
variant={isActive === true ? 'success' : 'light'}
size="sm"
className={`${styles.collapseBtn} ${
className={`${styles.collapsibleDropdownCollapseBtn} ${
isActive === true ? 'text-white' : 'text-secondary'
}`}
onClick={(): void => {
navigate(url);
}}
data-testid={`collapsible-dropdown-btn-${index}`}
>
<div className={styles.iconWrapperSm}>
<div className={styles.collapsibleDropdownIconWrapperSm}>
<i className={`fa ${stringIcon}`} />
</div>
{tCommon(name || '')}
Expand Down
17 changes: 17 additions & 0 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9126,3 +9126,20 @@ button[data-testid='createPostBtn'] {
font-style: oblique;
}
}

/* CollapsibleDropdown */

.collapsibleDropdownIconWrapper {
width: 36px;
}

.collapsibleDropdownCollapseBtn {
height: 48px;
}

.collapsibleDropdownIconWrapperSm {
width: 36px;
display: flex;
justify-content: center;
align-items: center;
}

0 comments on commit 5477f18

Please sign in to comment.