Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vpicone committed Jul 3, 2019
1 parent 01e4606 commit 5712b42
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions packages/gatsby-theme-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"mkdirp": "^0.5.1",
"node-sass": "^4.11.0",
"prop-types": "^15.7.2",
"react-copy-to-clipboard": "^5.0.1",
"react-helmet": "^6.0.0-beta",
"remark-slug": "^5.1.2",
"slugify": "^1.3.4",
Expand Down
10 changes: 3 additions & 7 deletions packages/gatsby-theme-carbon/src/components/Code/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { CodeSnippet } from 'carbon-components-react';
import 'prismjs/components/prism-bash';
import 'prismjs/components/prism-scss'; */
import { CopyToClipboard } from 'react-copy-to-clipboard/lib/Component';
import { Row } from '../Grid';
import { settings } from 'carbon-components';
import { Row } from '../Grid';

const { prefix } = settings;

Expand All @@ -17,12 +17,11 @@ export default class Code extends React.Component {
};

state = {
copied: false,
multi: true,
};

componentDidMount() {
//Prism.highlightAll();
// Prism.highlightAll();
if (this.codeRef) {
if (this.codeRef.clientHeight > 20) {
this.setState({ multi: true });
Expand All @@ -48,10 +47,7 @@ export default class Code extends React.Component {
return (
<Row>
<div className={`${prefix}--snippet--website`}>
<CopyToClipboard
text={textToCopy}
onCopy={() => this.setState({ copied: true })}
>
<CopyToClipboard text={textToCopy}>
<CodeSnippet type={type}>
<div ref={element => (this.codeRef = element)}>{children}</div>
</CodeSnippet>
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-theme-carbon/src/components/Code/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import Code from './Code';

export default Code;
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ export default class FeatureCard extends React.Component {
*/
actionIcon: PropTypes.string,

/**
* set to "dark" for dark background card
*/
color: PropTypes.string,

/**
* Use for disabled card
*/
Expand All @@ -49,9 +44,7 @@ export default class FeatureCard extends React.Component {
};

static defaultProps = {
dark: false,
disabled: false,
aspectRatio: '2:1',
actionIcon: 'launch',
};

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-theme-carbon/src/components/Video/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import cx from 'classnames';
import { video, vimeo } from './Video.module.scss';

export const Video = ({ vimeoId, title, ...props }) => {
const Video = ({ vimeoId, title, ...props }) => {
if (vimeoId) {
return (
<div className={cx(video, vimeo)}>
Expand Down

0 comments on commit 5712b42

Please sign in to comment.