Skip to content

Commit

Permalink
feat(imagegallerymodal): pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornalm committed Nov 30, 2020
1 parent 71d2d08 commit 48cbc5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/components/ImageGalleryModal/ImageGalleryModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import classnames from 'classnames';
import { Grid20, List20 } from '@carbon/icons-react';

import { settings } from '../../constants/Settings';
Expand Down Expand Up @@ -114,13 +114,14 @@ const ImageGalleryModal = ({
return text.includes(searchTerm);
});
setFilteredContent(filtered);
setSelectedImage(undefined);
};

const baseClass = `${iotPrefix}--image-gallery-modal`;
return (
<ComposedModal
type="normal"
className={classNames(className, baseClass)}
className={classnames(className, baseClass)}
footer={{
isPrimaryButtonDisabled: !selectedImage,
primaryButtonLabel: modalPrimaryButtonLabelText,
Expand Down Expand Up @@ -175,7 +176,7 @@ const ImageGalleryModal = ({
</div>
<div className={`${baseClass}__flex-wrapper`}>
<div
className={classNames(`${baseClass}__scroll-panel`, {
className={classnames(`${baseClass}__scroll-panel`, {
[`${baseClass}__scroll-panel--grid`]: activeView === GRID,
[`${baseClass}__scroll-panel--list`]: activeView === LIST,
})}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImageGalleryModal/_image-tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $title-height: 3rem;
&.#{$prefix}--tile--is-selected,
&:focus {
border-color: transparent;
& + input + .bx--tile {
& + input + .#{$prefix}--tile {
border-color: transparent;
}
}
Expand Down

0 comments on commit 48cbc5d

Please sign in to comment.