Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
blucas.wu committed Jun 5, 2023
1 parent 09c7f36 commit 2fba9ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/ReactJsonView/components/CopyContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import { Fragment, useCallback, useMemo } from 'react';
import copy from 'copy-to-clipboard';
import React from 'react';
import { cutOffStringLiteral, useSwitchWithDelay } from '../../utils';
import { CheckMark, CorssMark, TextCopy } from './SvgIcon';
import { CheckMark, CrossMark, TextCopy } from './SvgIcon';

interface Props {
content: string;
rows?: number;
length?: number;
}

const CopyContent: React.FC<Props> = ({ content }) => {
Expand Down Expand Up @@ -36,7 +34,7 @@ const CopyContent: React.FC<Props> = ({ content }) => {
color = '#52c41a';
break;
case -1:
Icon = CorssMark;
Icon = CrossMark;
color = '#ff4d4f';
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/ReactJsonView/components/JsonNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const JsonNode = ({
</>
)}
<span className={clsx('rjv-type-node', className)}>
<CopyContent content={`${data}`} rows={3} length={150} />
<CopyContent content={`${data}`} />
</span>
</code>
);
Expand Down
2 changes: 1 addition & 1 deletion src/ReactJsonView/components/SvgIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const CheckMark = (props: SVGAttributes<Element>) => (
</svg>
);

export const CorssMark = (props: SVGAttributes<Element>) => (
export const CrossMark = (props: SVGAttributes<Element>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
Expand Down

0 comments on commit 2fba9ac

Please sign in to comment.