Skip to content

Commit

Permalink
refactor: disallow undefined as a className
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBiehler committed Aug 3, 2020
1 parent 763290b commit 400a79b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/SideTray/SideTray.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, ReactNode, CSSProperties } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

// Rover UI dependencies
import { parseCssSize } from '../../shared/css-utils';
Expand All @@ -13,7 +14,7 @@ interface SideTrayProps {
direction?: string;
height?: string | number;
onClose: (...args) => void;
style?: object;
style?: CSSProperties;
visible?: boolean;
width?: string | number;
}
Expand Down Expand Up @@ -123,7 +124,7 @@ const SideTray: SideTrayType = ({
...(!visible ? { transform: hideTransformStyle } : {}),
...style,
}}
className={`${styles.SideTray} ${className}`}
className={classNames(styles.SideTray, className)}
>
<div className={styles.container}>{children}</div>
</div>
Expand Down

0 comments on commit 400a79b

Please sign in to comment.