feat(style): added dark mode (#446)

This commit is contained in:
Priscila Oliveira
2020-03-31 08:44:59 +02:00
committed by GitHub
parent 91434cc814
commit cdad5cf70d
43 changed files with 378 additions and 154 deletions

View File

@@ -15,10 +15,6 @@ import { Theme } from '../../design-tokens/theme';
import DetailSidebarTitle from './DetailSidebarTitle';
import DetailSidebarFundButton from './DetailSidebarFundButton';
const StyledPaper = styled(Paper)<{ theme?: Theme }>(({ theme }) => ({
padding: theme.spacing(3, 2),
}));
const DetailSidebar: React.FC = () => {
const detailContext = useContext(DetailContext);
@@ -50,3 +46,7 @@ const DetailSidebar: React.FC = () => {
};
export default DetailSidebar;
const StyledPaper = styled(Paper)<{ theme?: Theme }>(({ theme }) => ({
padding: theme?.spacing(3, 2),
}));

View File

@@ -13,15 +13,6 @@ interface Props {
isLatest: boolean;
}
const StyledHeading = styled(Heading)({
fontSize: '1rem',
fontWeight: 700,
});
const StyledBoxVersion = styled(Box)<{ theme?: Theme }>(({ theme }) => ({
color: theme && theme.palette.text.secondary,
}));
const DetailSidebarTitle: React.FC<Props> = ({ description, packageName, version, isLatest }) => {
const { t } = useTranslation();
return (
@@ -36,3 +27,12 @@ const DetailSidebarTitle: React.FC<Props> = ({ description, packageName, version
};
export default DetailSidebarTitle;
const StyledHeading = styled(Heading)({
fontSize: '1rem',
fontWeight: 700,
});
const StyledBoxVersion = styled(Box)<{ theme?: Theme }>(({ theme }) => ({
color: theme && theme.palette.text.secondary,
}));