Skip to content

Commit

Permalink
clean a tiny bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Jul 3, 2024
1 parent 38c8d9a commit 0038f1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/components/SearchBox/styled.elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const SearchInput = styled.input.attrs(() => ({
font-family: ${({ theme }) => theme.typography.fontFamily};
font-weight: bold;
font-size: 13px;
color: ${props => props.theme.sidebar.textColor};
color: var(--sidebar-text-color);
background-color: transparent;
outline: none;
`;
Expand Down Expand Up @@ -52,14 +52,14 @@ export const SearchIcon = styled((props: { className?: string }) => (
width: 0.9em;
path {
fill: ${props => props.theme.sidebar.textColor};
fill: var(--sidebar-text-color);
}
`;

export const SearchResultsBox = styled.div`
padding: ${props => props.theme.spacing.unit}px 0;
background-color: var(--sidebar-bg-color);
color: ${props => props.theme.sidebar.textColor};
color: var(--sidebar-text-color);
min-height: 150px;
max-height: 250px;
margin-top: 10px;
Expand Down
2 changes: 0 additions & 2 deletions src/components/SideMenu/styled.elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,11 @@ export const RedocAttribution = styled.div`
position: sticky;
width: ${theme.sidebar.width};
bottom: 0;
// background: ${theme.sidebar.backgroundColor};
background: var(--sidebar-bg-color);
a,
a:visited,
a:hover {
// /* color: ${theme.sidebar.textColor} !important; */
color: var(--sidebar-text-color) !important;
padding: ${theme.spacing.unit}px 0;
text-decoration: none;
Expand Down
4 changes: 2 additions & 2 deletions src/components/StickySidebar/StickyResponsiveSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const stickyfill = Stickyfill && Stickyfill();

const StyledStickySidebar = styled.div<{ open?: boolean }>`
width: ${props => props.theme.sidebar.width};
background-color: ${props => props.theme.sidebar.backgroundColor};
background-color: var(--sidebar-bg-color);
overflow: hidden;
display: flex;
flex-direction: column;
Expand All @@ -44,7 +44,7 @@ const StyledStickySidebar = styled.div<{ open?: boolean }>`
position: fixed;
z-index: 20;
width: 100%;
background: ${({ theme }) => theme.sidebar.backgroundColor};
background: var(--sidebar-bg-color);
display: ${props => (props.open ? 'flex' : 'none')};
`};
Expand Down
10 changes: 4 additions & 6 deletions src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cssVar, darken, lighten, readableColor, transparentize } from 'polished';
import { darken, lighten, readableColor, transparentize } from 'polished';
import { palette } from '@leafygreen-ui/palette';

const textFontFamily =
Expand Down Expand Up @@ -47,9 +47,8 @@ const defaultTheme: ThemeInterface = {
100: '#F5F5F5',
},
text: {
primary: cssVar('--text-primary-color', '#1C2D38') as string,
// secondary: ({ colors }) => lighten(colors.tonalOffset, colors.text.primary),
secondary: lighten(0.2, cssVar('--text-primary-color', '#1C2D38') as string),
primary: palette.gray.dark3,
secondary: ({ colors }) => lighten(colors.tonalOffset, colors.text.primary),
},
border: {
dark: 'rgba(0,0,0, 0.1)',
Expand Down Expand Up @@ -191,8 +190,6 @@ const defaultTheme: ThemeInterface = {
},
sidebar: {
width: '268px',
backgroundColor: cssVar('--sidebar-bg-color', '#F9FBFA') as string,
textColor: cssVar('--sidebar-text-color', '#112733') as string,
// backgroundColor: palette.gray.light3,
// textColor: palette.black,
activeTextColor: palette.green.dark3,
Expand All @@ -209,6 +206,7 @@ const defaultTheme: ThemeInterface = {
arrow: {
size: '1.5em',
// color: theme => theme.sidebar.textColor,

color: 'var(--sidebar-text-color)',
},
},
Expand Down

0 comments on commit 0038f1b

Please sign in to comment.