Skip to content

Commit

Permalink
change theme to vsLight
Browse files Browse the repository at this point in the history
  • Loading branch information
glenwid committed Mar 31, 2021
1 parent 44c5505 commit cc97b24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/components/CodeReviewCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Card} from "antd";
import {Card} from "antd";
import Highlight, {defaultProps, Language} from "prism-react-renderer";
import theme from "prism-react-renderer/themes/github";
import theme from "prism-react-renderer/themes/vsLight";
import {Line, LineContent, LineNo, Pre} from "./styles";
import "antd/dist/antd.css";

Expand All @@ -13,8 +13,7 @@ export interface CodeReviewCardProps {
}

const cardBodyStyle = {
padding: 0,
backgroundColor: '#f6f8fa'
padding: 0
}

export const CodeReviewCard: React.FC<CodeReviewCardProps> = ({
Expand All @@ -24,7 +23,11 @@ export const CodeReviewCard: React.FC<CodeReviewCardProps> = ({
title
}) => {
return (
<Card style={{ width: width }} title={title} className={"codeReview"} bodyStyle={cardBodyStyle}>
<Card style={{ width: width }}
title={title} className={"codeReview"}
bodyStyle={cardBodyStyle}
type={"inner"}
>
<Highlight {...defaultProps} theme={theme} code={code} language={language}>
{({ className, style, tokens, getLineProps, getTokenProps }) => (
<Pre className={className} style={style}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const LineNo = styled.span`
display: table-cell;
text-align: right;
padding-right: 1em;
padding-left: 5em;
padding-left: 2em;
user-select: none;
opacity: 0.5;
`;
Expand Down

0 comments on commit cc97b24

Please sign in to comment.