Skip to content

Commit

Permalink
DOP-4995: Dark Mode UAT: always on scroll, version selector hover fla…
Browse files Browse the repository at this point in the history
…sh, clear all filters flash (#1226)
  • Loading branch information
mmeigs committed Sep 11, 2024
1 parent 9f167c6 commit b6b72aa
Show file tree
Hide file tree
Showing 5 changed files with 445 additions and 7 deletions.
20 changes: 18 additions & 2 deletions src/components/SearchResults/SearchFilters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import styled from '@emotion/styled';
import { cx, css } from '@leafygreen-ui/emotion';
import Button from '@leafygreen-ui/button';
import Icon from '@leafygreen-ui/icon';
import { theme } from '../../theme/docsTheme';
Expand All @@ -20,6 +21,19 @@ const MaxWidthSelect = styled(Select)`
width: ${FILTER_WIDTH};
`;

const filtersButtonStyles = css`
.dark-theme & {
background-color: var(--gray-dark1);
border-color: var(--gray-base);
color: var(--white);
box-shadow: var(--gray-dark2) 0px 0px 0px 3px;
svg {
color: var(--gray-light2);
}
}
`;

const SearchFilters = ({ manuallyApplyFilters = false, onApplyFilters, ...props }) => {
const {
filters,
Expand Down Expand Up @@ -176,9 +190,11 @@ const SearchFilters = ({ manuallyApplyFilters = false, onApplyFilters, ...props
/>
</SelectWrapper>
{manuallyApplyFilters ? (
<Button onClick={applyFilters}>Apply filters</Button>
<Button onClick={applyFilters} className={cx(filtersButtonStyles)}>
Apply filters
</Button>
) : (
<Button leftGlyph={<Icon glyph="X" />} onClick={resetFilters}>
<Button leftGlyph={<Icon glyph="X" />} onClick={resetFilters} className={cx(filtersButtonStyles)}>
Clear all filters
</Button>
)}
Expand Down
7 changes: 7 additions & 0 deletions src/components/VersionDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ const StyledSelect = styled(Select)`
div:last-child svg {
color: var(--select-button-carot);
}
.dark-theme &:hover {
background-color: var(--gray-dark4);
color: var(--gray-light3);
border-color: var(--gray-base);
box-shadow: var(--gray-dark2) 0px 0px 0px 3px;
}
}
/* Override LG mobile style of enlarged mobile font */
Expand Down
13 changes: 13 additions & 0 deletions src/styles/global-dark-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ body {

--wayfinding-bg-color: var(--gray-dark3);
--wayfinding-border-color: var(--gray-dark2);

/* Style the scrollbar background */
::-webkit-scrollbar {
background: var(--gray-dark3);
}

/* Style the scrollbar handle */
::-webkit-scrollbar-thumb {
background: var(--gray-dark2);
border: 3px solid transparent;
border-radius: 9px;
background-clip: content-box;
}
}

.nav-dark {
Expand Down
Loading

0 comments on commit b6b72aa

Please sign in to comment.