File tree Expand file tree Collapse file tree 4 files changed +16
-8
lines changed
views/NewTutorial/ScenarioPageInput/ChangeDetectionGeoJsonPreview Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ interface Props {
1717 popupIcons ?: React . ReactNode ;
1818 contentClassName ?: string ;
1919 popupClassName ?: string ;
20+ popupVerticalPosition ?: 'top' | 'center' ;
2021}
2122
2223function MobilePreview ( props : Props ) {
@@ -31,6 +32,7 @@ function MobilePreview(props: Props) {
3132 popupIcons,
3233 contentClassName,
3334 popupClassName,
35+ popupVerticalPosition,
3436 } = props ;
3537
3638 return (
@@ -57,7 +59,13 @@ function MobilePreview(props: Props) {
5759 </ div >
5860 < div className = { styles . contentContainer } >
5961 { ( popupTitle || popupDescription || popupIcons ) && (
60- < div className = { _cs ( styles . popup , popupClassName ) } >
62+ < div
63+ className = { _cs (
64+ styles . popup ,
65+ popupClassName ,
66+ popupVerticalPosition === 'center' && styles . verticallyCentered ,
67+ ) }
68+ >
6169 < div className = { styles . details } >
6270 < div className = { styles . popupTitle } >
6371 { popupTitle }
Original file line number Diff line number Diff line change 55 border-radius : var (--radius-card-border );
66 background-color : var (--color-black );
77 padding : var (--spacing-small ) 0 ;
8- width : var (--width-mobile-preview );
8+ width : calc ( var (--width-mobile-preview ) + var ( --width-separator-mobile-preview ) );
99 height : var (--height-mobile-preview );
1010 color : var (--color-text-on-dark );
1111
6969 width : calc (100% - 2 * var (--spacing-small ));
7070 color : var (--color-text );
7171
72+ & .vertically-centered {
73+ top : 50% ;
74+ transform : translateY (-50% );
75+ }
76+
7277 .details {
7378 flex-grow : 1 ;
7479
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export default function ChangeDetectionGeoJsonPreview(props: Props) {
5353 popupTitle = { previewPopUp ?. title || 'Title' }
5454 popupDescription = { previewPopUp ?. description || 'Description' }
5555 contentClassName = { styles . content }
56- popupClassName = { styles . popup }
56+ popupVerticalPosition = "center"
5757 >
5858 < GeoJsonPreview
5959 className = { styles . mapPreview }
Original file line number Diff line number Diff line change 1111 height : var (--height-mobile-preview-change-detection-content );
1212 }
1313 }
14-
15- .popup {
16- top : 50% !important ;
17- transform : translateY (-50% );
18- }
1914}
You can’t perform that action at this time.
0 commit comments