Skip to content

Commit

Permalink
refactor: Extract isMdxType to own util file
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 11, 2020
1 parent 0e82c94 commit a0cfad4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/SideBySide.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import cx from 'classnames';
import styles from './SideBySide.module.scss';
import splitUsing from '../utils/splitUsing';
import splitWhen from '../utils/splitWhen';

const isMdxType = (child, type) => child?.props?.mdxType === type;
import { isMdxType } from '../utils/mdx';

const SideBySide = ({ className, children, type }) => {
const childObjects = Children.toArray(children);
Expand Down
1 change: 1 addition & 0 deletions src/utils/mdx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const isMdxType = (child, type) => child?.props?.mdxType === type;

0 comments on commit a0cfad4

Please sign in to comment.