File tree Expand file tree Collapse file tree 2 files changed +1
-38
lines changed
src/components/TeamsBanner Expand file tree Collapse file tree 2 files changed +1
-38
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,6 @@ export function TeamsBanner(): React.ReactElement | null {
1212 }
1313 } , [ ] ) ;
1414
15- useEffect ( ( ) => {
16- // Add or remove body class based on visibility
17- if ( isVisible ) {
18- document . body . classList . add ( 'teams-banner-visible' ) ;
19- } else {
20- document . body . classList . remove ( 'teams-banner-visible' ) ;
21- }
22-
23- // Cleanup on unmount
24- return ( ) => {
25- document . body . classList . remove ( 'teams-banner-visible' ) ;
26- } ;
27- } , [ isVisible ] ) ;
28-
2915 const handleDismiss = ( ) => {
3016 setIsVisible ( false ) ;
3117 localStorage . setItem ( 'teamsBannerDismissed' , 'true' ) ;
Original file line number Diff line number Diff line change 11.teamsBanner {
2- position : fixed;
3- top : 0 ;
4- left : 0 ;
5- right : 0 ;
6- z-index : 1000 ; /* Above navbar which typically has z-index: 999 */
2+ position : relative;
73 display : flex;
84 align-items : center;
95 justify-content : center;
6157 outline-offset : 2px ;
6258}
6359
64- /* Add padding to body when banner is visible */
65- : global (body.teams-banner-visible) {
66- padding-top : 52px ; /* Height of the banner */
67- }
68-
69- /* Adjust navbar position when banner is visible */
70- : global (body.teams-banner-visible) : global (.navbar ) {
71- top : 52px !important ; /* Push navbar below banner */
72- }
73-
7460@media (max-width : 768px ) {
7561 .teamsBanner {
7662 padding : 1rem ;
8874 top : 50% ;
8975 transform : translateY (-50% );
9076 }
91-
92- /* Adjust padding for mobile */
93- : global (body.teams-banner-visible) {
94- padding-top : 72px ; /* Slightly more height on mobile */
95- }
96-
97- : global (body.teams-banner-visible) : global (.navbar ) {
98- top : 72px !important ;
99- }
10077}
You can’t perform that action at this time.
0 commit comments