Skip to content

Commit

Permalink
aligned and switchout icons for expand and collapse (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
heejung-hong authored Sep 9, 2024
1 parent 9522386 commit 038577e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
44 changes: 29 additions & 15 deletions client/src/components/Faq/ExpandButtons.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { createUseStyles } from "react-jss";
import { MdExpandLess, MdExpandMore } from "react-icons/md";
import { MdOutlineUnfoldMore, MdOutlineUnfoldLess } from "react-icons/md";

const useStyles = createUseStyles({
expandCollapseFlexContainer: {
Expand Down Expand Up @@ -38,22 +38,36 @@ const ExpandButtons = ({ toggleExpandCollapse }) => {
return (
<div className={classes.expandCollapseFlexContainer}>
<div className={classes.expandCollapseAll}>
<div className={classes.faqExpandIcons}>
<MdExpandMore className={classes.faqCarotIcon} />
</div>
<button
className={classes.toggleButton}
onClick={() => toggleExpandCollapse(true)}
<div
style={{
display: "flex",
flexDirection: "row",
alignItems: "center"
}}
>
Expand All
</button>
<MdExpandLess className={classes.faqCarotIcon} />
<button
className={classes.toggleButton}
onClick={() => toggleExpandCollapse()}
<MdOutlineUnfoldMore className={classes.faqCarotIcon} />
<button
className={classes.toggleButton}
onClick={() => toggleExpandCollapse(true)}
>
Expand All
</button>
</div>
<div
style={{
display: "flex",
flexDirection: "row",
alignItems: "center"
}}
>
Collapse All
</button>
<MdOutlineUnfoldLess className={classes.faqCarotIcon} />
<button
className={classes.toggleButton}
onClick={() => toggleExpandCollapse()}
>
Collapse All
</button>
</div>
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Faq/FaqButtonContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export const FaqButtonContainer = ({
)}
<div className={classes.faqIcon}>
{faq.expand ? (
<MdExpandMore
<MdExpandLess
style={{ cursor: "pointer" }}
onClick={() => collapseFaq(faq)}
/>
) : (
<MdExpandLess
<MdExpandMore
style={{ cursor: "pointer" }}
onClick={() => expandFaq(faq)}
/>
Expand Down

0 comments on commit 038577e

Please sign in to comment.