Skip to content

Commit

Permalink
change cursor to pointer on hover
Browse files Browse the repository at this point in the history
Signed-off-by: Tanuj22 <[email protected]>
  • Loading branch information
Tanuj22 committed Aug 2, 2020
1 parent 8f66ca9 commit 14219a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion root-wrapper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { MDXProvider} from "@mdx-js/react";
import { MDXProvider } from "@mdx-js/react";
import Code from './src/components/CodeBlock'

const components = {
Expand Down
5 changes: 4 additions & 1 deletion src/components/CodeBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const CopyCode = styled.button`
opacity: 0.3;
&:hover {
opacity: 1;
cursor: pointer;
}
`;

Expand All @@ -55,8 +56,9 @@ const Code = ({ codeString, language }) => {
getLineProps,
getTokenProps,
}) => (
<div><CopyCode onClick={handleClick}>Copy</CopyCode>
<Pre className={className} style={style}>
<CopyCode onClick={handleClick}>Copy</CopyCode>

{tokens.map((line, i) => (
<div {...getLineProps({ line, key: i })}>
<LineNo>{i + 1}</LineNo>
Expand All @@ -66,6 +68,7 @@ const Code = ({ codeString, language }) => {
</div>
))}
</Pre>
</div>
)}
</Highlight>
)
Expand Down

0 comments on commit 14219a2

Please sign in to comment.