11import { useMemo , useState , useEffect , createRef } from 'react' ;
22import type { FC , ReactElement , JSXElementConstructor , MouseEvent } from 'react' ;
33import type { TabProps , TabContentProps } from '@patternfly/react-core' ;
4- import { Tabs , Tab , TabTitleText , TabContent , PageSection } from '@patternfly/react-core' ;
4+ import {
5+ Tabs ,
6+ Tab ,
7+ TabTitleText ,
8+ TabContent ,
9+ PageSection ,
10+ Sidebar ,
11+ SidebarContent ,
12+ SidebarPanel ,
13+ } from '@patternfly/react-core' ;
514import { useTranslation } from 'react-i18next' ;
615import { useParams , useNavigate } from 'react-router' ;
716import {
@@ -26,7 +35,6 @@ import type {
2635} from './types' ;
2736import UserPreferenceForm from './UserPreferenceForm' ;
2837import { getUserPreferenceGroups } from './utils/getUserPreferenceGroups' ;
29- import './UserPreferencePage.scss' ;
3038
3139const UserPreferencePage : FC = ( ) => {
3240 // resources and calls to hooks
@@ -117,7 +125,7 @@ const UserPreferencePage: FC = () => {
117125 } ;
118126 const activeTab = sortedUserPreferenceGroups . find ( ( group ) => group . id === activeTabId ) ?. label ;
119127 return (
120- < div className = "co-user-preference-page" >
128+ < >
121129 < DocumentTitle >
122130 { activeTab
123131 ? t ( 'console-app~User Preferences {{activeTab}}' , { activeTab } )
@@ -131,8 +139,8 @@ const UserPreferencePage: FC = () => {
131139 />
132140 < PageSection >
133141 { userPreferenceItemResolved ? (
134- < div className = "co-user-preference-page-content" >
135- < div className = "co-user-preference-page-content__tabs ">
142+ < Sidebar hasGutter >
143+ < SidebarPanel variant = "sticky ">
136144 < Tabs
137145 activeKey = { activeTabId }
138146 onSelect = { handleTabClick }
@@ -142,17 +150,17 @@ const UserPreferencePage: FC = () => {
142150 >
143151 { userPreferenceTabs }
144152 </ Tabs >
145- </ div >
146- < div className = "co-user-preference-page-content__tab-content" >
153+ </ SidebarPanel >
154+ < SidebarContent >
147155 { userPreferenceTabContents }
148156 { spotlight && spotlightElement && < Spotlight selector = { spotlight } interactive /> }
149- </ div >
150- </ div >
157+ </ SidebarContent >
158+ </ Sidebar >
151159 ) : (
152160 < LoadingBox />
153161 ) }
154162 </ PageSection >
155- </ div >
163+ </ >
156164 ) ;
157165} ;
158166
0 commit comments