@@ -16,13 +16,15 @@ const calcTextShadow = (weight, color) => {
1616} ;
1717
1818const defaultStyle : CSSProperties = {
19+ display : 'flex' ,
1920 boxSizing : 'border-box' ,
2021 whiteSpace : 'pre-wrap' ,
2122 overflow : 'hidden' ,
2223 color : '#ffffff' ,
2324 backgroundColor : 'rgba(0,0,0,0.1)' ,
2425 textShadow : calcTextShadow ( 1 , '#000000' ) ,
25- textAlign : 'left' ,
26+ textAlign : 'start' ,
27+ verticalAlign : 'start' ,
2628 width : 320 ,
2729 height : 540 ,
2830 padding : '0.25rem 0.5rem' ,
@@ -34,6 +36,7 @@ const TextWidget: VFC<TextWidgetProps> = ({
3436 textColor,
3537 fontSize,
3638 textAlign,
39+ verticalAlign,
3740 backgroundColor,
3841 edgeWeight,
3942 edgeColor,
@@ -55,9 +58,10 @@ const TextWidget: VFC<TextWidgetProps> = ({
5558 color : textColor || '#ffffff' ,
5659 fontSize : fontSize || '1rem' ,
5760 textShadow : edge ,
58- textAlign : textAlign || 'left' ,
61+ justifyContent : textAlign || 'start' ,
62+ alignItems : verticalAlign || 'start' ,
5963 backgroundColor : backgroundColor || 'rgba(0,0,0,0.1)' ,
60- display : hidden || autoHidden && text . length === 0 ? 'none' : 'block ' ,
64+ display : hidden || autoHidden && text . length === 0 ? 'none' : 'flex ' ,
6165 zIndex,
6266 } ;
6367
0 commit comments