Skip to content

Commit ab1537d

Browse files
committed
Use classNames instead of ternary
Use the classNames feature to include/exclude a class based on a boolean instead of ternary operator
1 parent 043e31a commit ab1537d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/library-item/library-item.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ class LibraryItemComponent extends React.PureComponent {
107107
) : (
108108
<Box
109109
className={classNames(
110-
styles.libraryItem,
111-
this.props.hidden ? styles.hidden : null
110+
styles.libraryItem, {
111+
[styles.hidden]: this.props.hidden
112+
}
112113
)}
113114
role="button"
114115
tabIndex="0"

0 commit comments

Comments
 (0)