-
Notifications
You must be signed in to change notification settings - Fork 6
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 #296 from WestpacGEL/feature/article-figcaption
Feature/article figcaption
- Loading branch information
Showing
9 changed files
with
69 additions
and
177 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
3 changes: 2 additions & 1 deletion
3
...omponents/component-blocks/components/article-body-image/article-body-image.component.tsx
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { styles as ArticleBodyImageStyles } from './article-body-image.style'; | ||
import { type ArticleBodyImageProps } from './article-body-image.types'; | ||
|
||
export const ArticleBodyImage = ({ articleBodyImage, alt }: ArticleBodyImageProps) => { | ||
export const ArticleBodyImage = ({ articleBodyImage, alt, title }: ArticleBodyImageProps) => { | ||
const styles = ArticleBodyImageStyles({}); | ||
return ( | ||
<figure className={styles.base({})}> | ||
<img className={styles.img({})} loading="lazy" alt={alt} src={articleBodyImage} /> | ||
{title && <figcaption className={styles.caption({})}>{title}</figcaption>} | ||
</figure> | ||
); | ||
}; |
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
1 change: 1 addition & 0 deletions
1
...src/components/component-blocks/components/article-body-image/article-body-image.types.ts
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export type ArticleBodyImageProps = { | ||
alt?: string; | ||
articleBodyImage?: string; | ||
title?: string; | ||
}; |
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
Oops, something went wrong.