Skip to content

Commit

Permalink
EDSC-4342 pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-zamora committed Jan 29, 2025
1 parent a403a48 commit 7ad3cb2
Showing 2 changed files with 19 additions and 7 deletions.
15 changes: 12 additions & 3 deletions static/src/js/components/Facets/Facets.jsx
Original file line number Diff line number Diff line change
@@ -49,7 +49,10 @@ const Facets = (props) => {
featuresFacet.children.push({
applied: featureFacets.availableInEarthdataCloud,
title: 'Available in Earthdata Cloud',
icon: CloudFill,
iconProps: {
icon: CloudFill,
label: 'a cloud'
},
type: 'feature'
})
}
@@ -58,7 +61,10 @@ const Facets = (props) => {
featuresFacet.children.push({
applied: featureFacets.customizable,
title: 'Customizable',
icon: Settings,
iconProps: {
icon: Settings,
label: 'a gear'
},
description: 'Include only collections that support customization (temporal, spatial, or variable subsetting, reformatting, etc.)',
type: 'feature'
})
@@ -67,7 +73,10 @@ const Facets = (props) => {
if (showMapImagery) {
featuresFacet.children.push({
applied: featureFacets.mapImagery,
icon: FaMap,
iconProps: {
icon: FaMap,
label: 'a map'
},
title: 'Map Imagery',
type: 'feature'
})
11 changes: 7 additions & 4 deletions static/src/js/components/Facets/FacetsItem.jsx
Original file line number Diff line number Diff line change
@@ -105,12 +105,12 @@ class FacetsItem extends Component {
/>
<span className="facets-item__title">
{
facet.icon && (
facet.iconProps && (
<EDSCIcon
className="facets-item__icon"
icon={facet.icon}
icon={facet.iconProps.icon}
variant="facet"
aria-label={facet.title}
aria-label={facet.iconProps.label || facet.title}
/>
)
}
@@ -160,7 +160,10 @@ FacetsItem.propTypes = {
count: PropTypes.number,
title: PropTypes.string,
description: PropTypes.string,
icon: PropTypes.elementType
iconProps: PropTypes.shape({
icon: PropTypes.elementType,
label: PropTypes.string
})
}).isRequired,
facetCategory: PropTypes.string.isRequired,
level: PropTypes.number.isRequired,

0 comments on commit 7ad3cb2

Please sign in to comment.