Skip to content

Commit

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

This reverts commit 01120c6.
  • Loading branch information
palisadoes authored Jan 28, 2025
1 parent 01120c6 commit 6899d79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
14 changes: 14 additions & 0 deletions src/components/CollapsibleDropdown/CollapsibleDropdown.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.iconWrapper {
width: 36px;
}

.collapseBtn {
height: 48px;
}

.iconWrapperSm {
width: 36px;
display: flex;
justify-content: center;
align-items: center;
}
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 '../../style/app.module.css';
import styles from './CollapsibleDropdown.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.collapsibleDropdownIconWrapper}>
<div className={styles.iconWrapper}>
<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.collapsibleDropdownCollapseBtn} ${
className={`${styles.collapseBtn} ${
isActive === true ? 'text-white' : 'text-secondary'
}`}
onClick={(): void => {
navigate(url);
}}
data-testid={`collapsible-dropdown-btn-${index}`}
>
<div className={styles.collapsibleDropdownIconWrapperSm}>
<div className={styles.iconWrapperSm}>
<i className={`fa ${stringIcon}`} />
</div>
{tCommon(name || '')}
Expand Down
17 changes: 0 additions & 17 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9101,20 +9101,3 @@ button[data-testid='createPostBtn'] {
gap: 10px;
align-items: center;
}

/* CollapsibleDropdown */

.collapsibleDropdownIconWrapper {
width: 36px;
}

.collapsibleDropdownCollapseBtn {
height: 48px;
}

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

0 comments on commit 6899d79

Please sign in to comment.