66 EditableInlineText ,
77 EditableText ,
88 InlineFileRights ,
9+ Text ,
910 useFileWithInlineRights ,
1011 useContentElementConfigurationUpdate ,
1112 useContentElementEditorState ,
@@ -15,6 +16,12 @@ import {
1516
1617import { Thumbnail } from './Thumbnail' ;
1718
19+ const scaleCategorySuffixes = {
20+ small : 'sm' ,
21+ medium : 'md' ,
22+ large : 'lg'
23+ } ;
24+
1825export function ExternalLink ( { id, configuration, ...props } ) {
1926 const { isEditable, isSelected} = useContentElementEditorState ( ) ;
2027 const updateConfiguration = useContentElementConfigurationUpdate ( ) ;
@@ -77,6 +84,8 @@ export function ExternalLink({id, configuration, ...props}) {
7784 const href = itemLinks [ id ] ? itemLinks [ id ] ?. href : ensureAbsolute ( props . url ) ;
7885 const openInNewTab = itemLinks [ id ] ? itemLinks [ id ] ?. openInNewTab : props . open_in_new_tab ;
7986
87+ const scaleCategorySuffix = scaleCategorySuffixes [ props . textSize || 'small' ] ;
88+
8089 return (
8190 < li className = { classNames ( styles . item ,
8291 styles [ `textPosition-${ props . textPosition } ` ] ,
@@ -93,7 +102,6 @@ export function ExternalLink({id, configuration, ...props}) {
93102 < div className = { classNames (
94103 styles . card ,
95104 styles [ `thumbnailSize-${ props . thumbnailSize } ` ] ,
96- styles [ `textSize-${ props . textSize } ` ] ,
97105 { [ styles . invert ] : props . invert
98106 } ) } >
99107 < div className = { styles . thumbnail } >
@@ -109,20 +117,20 @@ export function ExternalLink({id, configuration, ...props}) {
109117 < InlineFileRights context = "afterElement" items = { [ { file : thumbnailImageFile , label : 'image' } ] } />
110118 < div className = { styles . details } >
111119 { presentOrEditing ( 'tagline' ) &&
112- < div className = { styles . tagline } >
120+ < Text scaleCategory = { `teaserTagline- ${ scaleCategorySuffix } ` } >
113121 < EditableInlineText value = { itemTexts [ id ] ?. tagline }
114122 placeholder = { t ( 'pageflow_scrolled.inline_editing.type_tagline' ) }
115123 onChange = { value => handleTextChange ( 'tagline' , value ) } />
116- </ div > }
117- < div className = { styles . title } >
124+ </ Text > }
125+ < Text scaleCategory = { `teaserTitle- ${ scaleCategorySuffix } ` } >
118126 < EditableInlineText value = { itemTexts [ id ] ?. title || legacyTexts . title }
119127 placeholder = { t ( 'pageflow_scrolled.inline_editing.type_heading' ) }
120128 onChange = { value => handleTextChange ( 'title' , value ) } />
121- </ div >
129+ </ Text >
122130 { presentOrEditing ( 'description' ) &&
123131 < div className = { styles . link_desc } >
124132 < EditableText value = { itemTexts [ id ] ?. description || legacyTexts . description }
125- scaleCategory = " teaserDescription"
133+ scaleCategory = { ` teaserDescription- ${ scaleCategorySuffix } ` }
126134 placeholder = { t ( 'pageflow_scrolled.inline_editing.type_text' ) }
127135 onChange = { value => handleTextChange ( 'description' , value ) } />
128136 </ div > }
0 commit comments