File tree Expand file tree Collapse file tree 5 files changed +21
-11
lines changed Expand file tree Collapse file tree 5 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 1
1
import { Checkbox , CHECKBOX_VALUE } from '../../../Common'
2
- import { ImageWithFallback } from '../ImageWithFallback '
2
+ import PluginImageContainer from './PluginImageContainer '
3
3
import PluginTagsContainer from './PluginTagsContainer'
4
4
import { PluginCardProps } from './types'
5
- import { ReactComponent as ICLegoBlock } from '../../../Assets/Icon/ic-lego-block.svg'
6
5
import { ReactComponent as ICBookOpen } from '../../../Assets/Icon/ic-book-open.svg'
7
6
8
7
const PluginCard = ( {
@@ -39,14 +38,9 @@ const PluginCard = ({
39
38
</ div >
40
39
) }
41
40
42
- { /* TODO: Test multiple cards with fallback since has if in LegoBlock */ }
43
41
{ ! isSelected && (
44
- < ImageWithFallback
45
- fallbackImage = {
46
- < ICLegoBlock
47
- className = { `dc__no-shrink icon-dim-40 ${ isSelectable ? 'dc__visible-hover--hide-child' : '' } ` }
48
- />
49
- }
42
+ < PluginImageContainer
43
+ fallbackImageClassName = { `icon-dim-40 ${ isSelectable ? 'dc__visible-hover--hide-child' : '' } ` }
50
44
imageProps = { {
51
45
src : icon ,
52
46
alt : `${ name } logo` ,
Original file line number Diff line number Diff line change
1
+ import { PluginImageContainerProps } from './types'
2
+ import { ReactComponent as ICLegoBlock } from '../../../Assets/Icon/ic-lego-block.svg'
3
+ import { ImageWithFallback } from '../ImageWithFallback'
4
+
5
+ const PluginImageContainer = ( { imageProps, fallbackImageClassName } : PluginImageContainerProps ) => (
6
+ < ImageWithFallback
7
+ fallbackImage = { < ICLegoBlock className = { `dc__no-shrink ${ fallbackImageClassName } ` } /> }
8
+ imageProps = { imageProps }
9
+ />
10
+ )
11
+
12
+ export default PluginImageContainer
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ const PluginListContainer = ({
227
227
} }
228
228
onRemoveFilter = { handleRemoveSelectedTag }
229
229
clearFilters = { handleClearFilters }
230
- className = "p-0 w-100 pt-4 "
230
+ className = "w-100 pt-0-imp "
231
231
clearButtonClassName = "dc__no-background-imp dc__no-border-imp dc__tab-focus"
232
232
shouldHideLabel
233
233
/>
Original file line number Diff line number Diff line change 1
1
import { VariableType } from '../../../Common'
2
2
import { BaseFilterQueryParams } from '../../types'
3
+ import { ImageWithFallbackProps } from '../ImageWithFallback'
3
4
import { getPluginStoreData } from './service'
4
5
5
6
export enum PluginCreationType {
@@ -196,3 +197,7 @@ export interface PluginTagsContainerProps {
196
197
tags : string [ ]
197
198
rootClassName ?: string
198
199
}
200
+
201
+ export interface PluginImageContainerProps extends Pick < ImageWithFallbackProps , 'imageProps' > {
202
+ fallbackImageClassName ?: string
203
+ }
Original file line number Diff line number Diff line change @@ -191,7 +191,6 @@ export const MenuListWithApplyButton = ({
191
191
} : MenuListProps & { handleApplyFilter : ( ) => void } ) => (
192
192
< >
193
193
< components . MenuList { ...props } />
194
- { /* TODO: Check not working look into this */ }
195
194
{ props . selectProps . options . length > 0 && (
196
195
< div className = "p-8 dc__position-sticky dc__bottom-0 dc__border-top-n1 bcn-0 dc__bottom-radius-4" >
197
196
< button
You can’t perform that action at this time.
0 commit comments