Skip to content

Commit

Permalink
Change Reset Filters/Sort button style to tertiary
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Nov 14, 2024
1 parent 37c1e05 commit 6b1c843
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
32 changes: 32 additions & 0 deletions client/src/components/Button/TertiaryButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import PropTypes from "prop-types";
import Button from "./Button";
import { MdPrint } from "react-icons/md";

const TertiaryButton = ({ id, onClick, isDisabled, isDisplayed, children }) => {
return (
<Button
type="input"
color={"colorDisabled"}
variant="download"
onClick={onClick}
id={id}
data-testid={id}
disabled={isDisabled}
isDisplayed={isDisplayed}
>
<MdPrint style={{ marginRight: "0.5em" }} />
{children}
</Button>
);
};

TertiaryButton.propTypes = {
children: PropTypes.object,
onClick: PropTypes.func,
id: PropTypes.string.isRequired,
isDisabled: PropTypes.bool,
isDisplayed: PropTypes.bool.isRequired
};

export default TertiaryButton;
5 changes: 3 additions & 2 deletions client/src/components/Projects/ProjectsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import MultiProjectToolbarMenu from "./MultiProjectToolbarMenu";
import fetchEngineRules from "./fetchEngineRules";
import UniversalSelect from "../UI/UniversalSelect";
import ProjectTableColumnHeader from "./ColumnHeaderPopups/ProjectTableColumnHeader";
import TertiaryButton from "../Button/TertiaryButton";

const useStyles = createUseStyles({
outerDiv: {
Expand Down Expand Up @@ -941,12 +942,12 @@ const ProjectsPage = ({ contentContainerRef }) => {
<MdOutlineSearch className={classes.searchIcon} />
</div>
<div>
<button
<TertiaryButton
onClick={resetFiltersSort}
style={{ height: "40px" }}
>
RESET FILTERS/SORT
</button>
</TertiaryButton>
{/* {filterCollapsed ? (
<button
alt="Show Filter Criteria"
Expand Down

0 comments on commit 6b1c843

Please sign in to comment.