generated from vtex-apps/react-app-template
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from vtex-apps/feature/image-title
Add title prop to the image component
- Loading branch information
Showing
9 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ const Image: StorefrontFunctionComponent<ImageProps> = ({ | |
sizes = '', | ||
link, | ||
intl, | ||
title, | ||
}) => { | ||
const handles = useCssHandles(CSS_HANDLES, { | ||
migrationFrom: '[email protected]', | ||
|
@@ -51,9 +52,10 @@ const Image: StorefrontFunctionComponent<ImageProps> = ({ | |
|
||
const imgElement = ( | ||
<img | ||
src={formattedSrc} | ||
srcSet={srcSet} | ||
title={title} | ||
sizes={sizes} | ||
srcSet={srcSet} | ||
src={formattedSrc} | ||
alt={formattedAlt} | ||
style={imageDimensions} | ||
className={handles.imageElement} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
"eslint": "5.x", | ||
"eslint-config-vtex-react": "^5.x", | ||
"prettier": "^1.18.2", | ||
"typescript": "3.5.2", | ||
"typescript": "3.7.3", | ||
"vtex.render-runtime": "http://vtex.vteximg.com.br/_v/public/typings/v1/[email protected]/public/_types/react", | ||
"vtex.native-types": "http://vtex.vteximg.com.br/_v/public/typings/v1/[email protected]/public/_types/react" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters