File tree Expand file tree Collapse file tree 3 files changed +39
-15
lines changed
src/frontend/apps/impress/src/features Expand file tree Collapse file tree 3 files changed +39
-15
lines changed Original file line number Diff line number Diff line change 1- import { Button , useModal } from '@gouvfr-lasuite/cunningham-react' ;
1+ import {
2+ Button ,
3+ ButtonProps ,
4+ useModal ,
5+ } from '@gouvfr-lasuite/cunningham-react' ;
26import { DropdownMenu } from '@gouvfr-lasuite/ui-kit' ;
37import { useCallback , useMemo , useState } from 'react' ;
48import { useTranslation } from 'react-i18next' ;
@@ -12,7 +16,11 @@ import WandAndStarsIcon from '../assets/wand-and-stars.svg';
1216
1317import { OnBoarding } from './OnBoarding' ;
1418
15- export const HelpMenu = ( ) => {
19+ export const HelpMenu = ( {
20+ colorButton,
21+ } : {
22+ colorButton ?: ButtonProps [ 'color' ] ;
23+ } ) => {
1624 const { t } = useTranslation ( ) ;
1725 const [ isMenuOpen , setIsMenuOpen ] = useState ( false ) ;
1826 const modalOnbording = useModal ( ) ;
@@ -53,7 +61,7 @@ export const HelpMenu = () => {
5361 < Box $direction = "row" $align = "center" >
5462 < Button
5563 aria-label = { t ( 'Open onboarding menu' ) }
56- color = " neutral"
64+ color = { colorButton || ' neutral' }
5765 variant = "tertiary"
5866 iconPosition = "left"
5967 icon = { < HelpOutlineIcon aria-hidden = "true" /> }
Original file line number Diff line number Diff line change @@ -50,6 +50,20 @@ const OnBoardingStyle = createGlobalStyle`
5050 background-color: var(--c--contextuals--border--surface--primary);
5151 }
5252
53+ @media (max-width: 768px) {
54+ .c__modal__scroller {
55+ height: 100vh;
56+ display: flex;
57+ flex-direction: column;
58+
59+ & .c__onboarding-modal__body{
60+ justify-content: center;
61+ }
62+ & .c__onboarding-modal__content {
63+ height:auto;
64+ }
65+ }
66+ }
5367` ;
5468
5569type OnBoardingProps = {
Original file line number Diff line number Diff line change 11import { useTranslation } from 'react-i18next' ;
22import { createGlobalStyle , css } from 'styled-components' ;
33
4- import { Box , SeparatedSection } from '@/components' ;
4+ import { Box , HorizontalSeparator , SeparatedSection } from '@/components' ;
55import { useConfig } from '@/core/config/api/useConfig' ;
66import { useCunninghamTheme } from '@/cunningham' ;
77import { ButtonLogin } from '@/features/auth' ;
@@ -74,6 +74,7 @@ export const LeftPanel = () => {
7474 { isPanelOpenState && < MobileLeftPanelStyle /> }
7575 < Box
7676 $hasTransition
77+ $height = "100vh"
7778 $css = { css `
7879 z-index : 999 ;
7980 width : 100dvw ;
@@ -97,25 +98,26 @@ export const LeftPanel = () => {
9798 align-items : center;
9899 gap : ${ spacingsTokens [ 'base' ] } ;
99100 ` }
101+ $height = "inherit"
100102 >
101103 < LeftPanelHeader />
102104 < LeftPanelContent />
103- { showHelpMenu && (
105+ < Box $width = "100%" >
106+ < HorizontalSeparator $margin = "none" />
104107 < SeparatedSection showSeparator = { false } >
105108 < Box
106- $padding = { { horizontal : 'sm' , vertical : 'xs' } }
107- $justify = "flex-start"
109+ $justify = "end"
110+ $align = "center"
111+ $gap = { spacingsTokens [ 'xs' ] }
112+ $direction = "row"
113+ $padding = { { horizontal : 'sm' } }
108114 >
109- < HelpMenu />
115+ < HelpMenu colorButton = "brand" />
116+ < ButtonLogin />
117+ < LanguagePicker />
110118 </ Box >
111119 </ SeparatedSection >
112- ) }
113- < SeparatedSection showSeparator = { false } >
114- < Box $justify = "center" $align = "center" $gap = { spacingsTokens [ 'sm' ] } >
115- < ButtonLogin />
116- < LanguagePicker />
117- </ Box >
118- </ SeparatedSection >
120+ </ Box >
119121 </ Box >
120122 </ Box >
121123 </ >
You can’t perform that action at this time.
0 commit comments