File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
react-notion-x/src/components Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ export interface BaseContentBlock extends BaseBlock {
131131 properties : {
132132 source : string [ ] [ ]
133133 caption ?: Decoration [ ]
134+ alt_text ?: Decoration [ ]
134135 }
135136 format ?: {
136137 block_alignment : 'center' | 'left' | 'right'
Original file line number Diff line number Diff line change @@ -280,8 +280,9 @@ export function Asset({
280280 source = block . properties ?. source ?. [ 0 ] ?. [ 0 ]
281281 }
282282 const src = mapImageUrl ( source , block as Block )
283+ const altText = getTextContent ( block . properties ?. alt_text )
283284 const caption = getTextContent ( block . properties ?. caption )
284- const alt = caption || 'notion image'
285+ const alt = altText || caption || 'notion image'
285286
286287 content = (
287288 < LazyImage
You can’t perform that action at this time.
0 commit comments