Skip to content

Commit

Permalink
More styling for dark theme for accounts list
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshire137 committed Feb 1, 2020
1 parent 7846a4e commit 5d4367c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/components/AccountListItem/AccountListItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@
.btn-rank.btn-link:focus {
text-decoration: none;
}

.theme-dark .Box .AvatarStack-body .avatar.account-hero-avatar {
background-color: #2f363d;
}
8 changes: 6 additions & 2 deletions src/components/AccountListItem/AccountListItemStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import styled from "styled-components";
import { Box } from "@primer/components";
import ButtonShownOnHover from "./ButtonShownOnHover";

interface Props {
appTheme: string;
}

export default styled(Box).attrs({
as: "li",
p: 3
})`
})<Props>`
& + & {
border-top: 1px solid ${props => props.theme.colors.gray[3]};
border-top: 1px solid ${props => props.appTheme === "dark" ? props.theme.colors.gray[7] : props.theme.colors.gray[3]};
}
&:hover ${ButtonShownOnHover} {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountListItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const AccountListItem = ({
const haveLatestResult = latestMatch && latestMatch.result;

return (
<AccountListItemStyle>
<AccountListItemStyle appTheme={theme}>
<Flex justifyContent="space-between" alignItems="center">
<div className="width-full mb-2 mt-1">
<Flex justifyContent="space-between" alignItems="center">
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeroImageTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface Props {
}

const HeroImageTag = styled("img")<Props>`
background-color: ${props => props.appTheme === "dark" ? "#2f363d" : "inherit"};
background-color: ${props => props.appTheme === "dark" ? "#2f363d !important" : "inherit"};
`;

export default HeroImageTag;

0 comments on commit 5d4367c

Please sign in to comment.