Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7c22743

Browse files
Merge pull request #541 from topcoder-platform/issue-88
fix issue #88
2 parents c1660e5 + ecf3fc4 commit 7c22743

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

client/src/components/collapsible/index.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,17 @@ export default function Collapsible({ title, children, collapsed = false }) {
2121
<div className={styles.collapsibleHeader}>
2222
<div className={styles.collapsibleTitle}>{title}</div>
2323
<div className={styles.collapsibleChevronContainer}>
24-
<div
25-
className={iconStyles.chevronDownG}
26-
onClick={() => setIsCollapsed(!isCollapsed)}
27-
></div>
24+
{isCollapsed ? (
25+
<div
26+
className={iconStyles.chevronDownG}
27+
onClick={() => setIsCollapsed(!isCollapsed)}
28+
></div>
29+
) : (
30+
<div
31+
className={iconStyles.chevronUpG}
32+
onClick={() => setIsCollapsed(!isCollapsed)}
33+
></div>
34+
)}
2835
</div>
2936
</div>
3037
{/* Divider between header and body */}

client/src/styles/icons.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,12 @@
104104
width: 13px;
105105
height: 7px;
106106
}
107+
108+
.chevronUpG {
109+
background: url("/sprites.png") no-repeat -1px -100px;
110+
background-size: 49px 111px;
111+
width: 13px;
112+
height: 7px;
113+
transform: rotate(180deg);
114+
}
107115
/* END Icons */

0 commit comments

Comments
 (0)