diff --git a/src/frontend/components/view--goal-facets.tsx b/src/frontend/components/view--goal-facets.tsx index 2ef4d399..521b62a9 100644 --- a/src/frontend/components/view--goal-facets.tsx +++ b/src/frontend/components/view--goal-facets.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from 'react'; +import { Icon } from "@trussworks/react-uswds"; -const ViewGoalFacets = ({handleSearch}) => { +const ViewGoalFacets = ({handleSearch, handleClose}) => { const [facets, setFacets] = useState(null); const url = `/api/get-facets`; @@ -34,6 +35,12 @@ const ViewGoalFacets = ({handleSearch}) => { return(
+
+

Filter by topic

+ +
{facets.data.termTopics.nodes.map(( facetKey ) => (
{ + setFiltersOpen(!filtersOpen); + }; const handleSearch = useCallback(async (e: FormEvent, facets: Array = []) => { if (e) { e.preventDefault(); @@ -60,100 +63,104 @@ export default function GoalsSearchView({ filters, goals, total, description }:

Smart Strategy. Strong Execution.

Data-Driven Updates on America’s Strategic Goals.

-
-
- -
-
- +
+
+
+ +
+ {!filtersOpen && ( +
+ +
+ )} +
+ +
+
+
+ + +
+
-
-
- - -
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
-
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
- -
-
- {displayGoals?.length ? ( - - - {displayGoals.slice(0, offset).map((goal) => ( - isNodeGoalProps(goal) ? ( - - ) : ( - - ) - ))} - - +
+
+ {displayGoals?.length ? ( + + + {displayGoals.slice(0, offset).map((goal) => ( + isNodeGoalProps(goal) ? ( + + ) : ( + + ) + ))} + + - ) : ( -
-
-

- No matching goals. -

+ ) : ( +
+
+

+ No matching goals. +

+
-
- )} + )} -
- {offset < totalResults && - - } -
+
+ {offset < totalResults && + + } +
+
diff --git a/src/frontend/styles/style.scss b/src/frontend/styles/style.scss index 99eab310..d3958395 100644 --- a/src/frontend/styles/style.scss +++ b/src/frontend/styles/style.scss @@ -22,12 +22,27 @@ $goals-gray: rgba(202, 204, 216, 1); margin-bottom: 0 !important; } +.container-open { + padding-left: 394px; +} + .side-bar { background-color: white; min-height: 100%; width: 394px; max-width: 394px; - padding: 24px; + padding: 0 24px 24px; + border-right: 1px solid $goals-gray; + position: absolute; + top: 0; + left: 0; +} + +.close-button { + appearance: none; + border: 0px; + cursor: pointer; + background: transparent; } .filters-closed {