diff --git a/web/calendar/calendar.react.js b/web/calendar/calendar.react.js --- a/web/calendar/calendar.react.js +++ b/web/calendar/calendar.react.js @@ -160,11 +160,16 @@ let filterPanel = null; let calendarContentStyle = null; - let filterButtonStyle = null; + let filterButton = null; if (this.state.filterPanelOpen) { - filterPanel = ; + filterPanel = ; calendarContentStyle = { marginLeft: '300px' }; - filterButtonStyle = { backgroundColor: 'rgba(0,0,0,0.67)' }; + } else { + filterButton = ( + + + + ); } return ( @@ -172,13 +177,7 @@ {filterPanel}
- - - + {filterButton}
+ + +
{filters}
@@ -384,8 +389,14 @@ }; } -const ConnectedFilterPanel: React.ComponentType<{}> = React.memo<{}>( - function ConnectedFilterPanel(): React.Node { +type ConnectedFilterPanelProps = { + +toggleFilters: (event: SyntheticEvent) => void, +}; + +const ConnectedFilterPanel: React.ComponentType = + React.memo(function ConnectedFilterPanel( + props: ConnectedFilterPanelProps, + ): React.Node { const filteredThreadIDs = useSelector(filteredThreadIDsSelector); const filteredCommunityThreadIDs = useSelector( filterThreadIDsBelongingToCommunitySelector, @@ -405,9 +416,9 @@ includeDeleted={includeDeleted} dispatch={dispatch} pushModal={modalContext.pushModal} + toggleFilters={props.toggleFilters} /> ); - }, -); + }); export default ConnectedFilterPanel; diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -207,6 +207,8 @@ --filters-button-bg: var(--shades-black-100); --filters-button-border: var(--shades-black-80); --filters-button-hover-bg: var(--shades-black-90); + --filter-panel-fg: var(--shades-black-60); + --filter-panel-bg: #0d0d0d; --topbar-button-bg-hover: var(--shades-black-80); --topbar-button-fg: var(--shades-white-60); }