1
1
import * as React from 'react' ;
2
- import { Card , CardBody , ExpandableSection } from '@patternfly/react-core' ;
2
+ import { CardHeader , Content , ContentVariants , PageSection } from '@patternfly/react-core' ;
3
3
import { useTranslation } from 'react-i18next' ;
4
- import { useUserSettings } from '@console/shared' ;
4
+ import { GettingStartedExpandableGrid , useUserSettings } from '@console/shared' ;
5
5
import { FUNCTIONS_GETTING_STARTED_SECTION_USER_SETTING_KEY } from '../../const' ;
6
6
import { FunctionsDocsGettingStartedCard } from './FunctionsDocsGettingStartedCard' ;
7
7
import { QuickStartGettingStartedCard } from './QuickStartGettingStartedCard' ;
8
8
import { SampleGettingStartedCard } from './SamplesGettingStartedCard' ;
9
9
10
- import './GettingStartedSection.scss' ;
11
-
12
10
export const GettingStartedSection : React . FC = ( ) => {
13
11
const { t } = useTranslation ( ) ;
14
12
@@ -18,30 +16,30 @@ export const GettingStartedSection: React.FC = () => {
18
16
) ;
19
17
20
18
return (
21
- < div className = "odc-functions-getting-started-section" >
22
- < ExpandableSection
23
- toggleText = { t ( 'knative-plugin~Get started with functions' ) }
24
- onToggle = { ( ) => setIsGettingStartedSectionOpen ( ! isGettingStartedSectionOpen ) }
25
- isExpanded = { isGettingStartedSectionOpen }
26
- displaySize = "lg"
19
+ < PageSection className = "pf-v6-u-pt-0" >
20
+ < GettingStartedExpandableGrid
21
+ setIsOpen = { setIsGettingStartedSectionOpen }
22
+ isOpen = { isGettingStartedSectionOpen }
23
+ title = { < > { t ( 'knative-plugin~Get started with functions' ) } </ > }
24
+ headerContent = {
25
+ < CardHeader >
26
+ < Content component = { ContentVariants . h4 } >
27
+ { t ( 'knative-plugin~Choose how to create a function from below methods' ) }
28
+ </ Content >
29
+ </ CardHeader >
30
+ }
31
+ titleTooltip = { false }
27
32
>
28
- < Card className = "odc-functions-getting-started-grid" data-test = "getting-started" >
29
- < span className = "odc-functions-getting-started-grid__title" >
30
- { t ( 'knative-plugin~Choose how to create a function from below methods' ) }
31
- </ span >
32
- < CardBody className = "odc-functions-getting-started-grid__content" >
33
- < SampleGettingStartedCard />
34
- < QuickStartGettingStartedCard
35
- featured = { [ 'serverless-functions-using-cli' , 'serverless-functions-using-ide' ] }
36
- title = { t ( 'knative-plugin~Create function with guided documentation' ) }
37
- description = { t (
38
- 'knative-plugin~Follow guided documentation to create serverless functions.' ,
39
- ) }
40
- />
41
- < FunctionsDocsGettingStartedCard />
42
- </ CardBody >
43
- </ Card >
44
- </ ExpandableSection >
45
- </ div >
33
+ < SampleGettingStartedCard />
34
+ < QuickStartGettingStartedCard
35
+ featured = { [ 'serverless-functions-using-cli' , 'serverless-functions-using-ide' ] }
36
+ title = { t ( 'knative-plugin~Create function with guided documentation' ) }
37
+ description = { t (
38
+ 'knative-plugin~Follow guided documentation to create serverless functions.' ,
39
+ ) }
40
+ />
41
+ < FunctionsDocsGettingStartedCard />
42
+ </ GettingStartedExpandableGrid >
43
+ </ PageSection >
46
44
) ;
47
45
} ;
0 commit comments