11import { useEffect , useState } from 'react' ;
22import { createPortal } from 'react-dom' ;
3- import {
4- Wizard ,
5- WizardStep ,
6- Title ,
7- Button ,
8- Popover ,
9- Text ,
10- } from '@ui5/webcomponents-react' ;
3+ import { Wizard , WizardStep , Title } from '@ui5/webcomponents-react' ;
114import { useTranslation } from 'react-i18next' ;
125import { useRecoilValue , useSetRecoilState } from 'recoil' ;
136import { useSetAtom } from 'jotai' ;
@@ -31,12 +24,13 @@ import { WizardButtons } from 'shared/components/WizardButtons/WizardButtons';
3124import { ClusterPreview } from './ClusterPreview' ;
3225
3326import './AddClusterWizard.scss' ;
27+ import { HintButton } from 'shared/components/DescriptionHint/DescriptionHint' ;
3428
3529export function AddClusterWizard ( {
3630 kubeconfig,
3731 setKubeconfig,
38- config,
3932 dialogRef,
33+ config = { } ,
4034} ) {
4135 const busolaClusterParams = useRecoilValue ( configurationAtom ) ;
4236 const { t } = useTranslation ( ) ;
@@ -175,7 +169,6 @@ export function AddClusterWizard({
175169 >
176170 < KubeconfigUpload
177171 kubeconfig = { kubeconfig }
178- config = { config }
179172 setKubeconfig = { updateKubeconfig }
180173 formRef = { authFormRef }
181174 />
@@ -231,28 +224,14 @@ export function AddClusterWizard({
231224 < div className = "add-cluster__content-container" >
232225 < Title level = "H5" className = "sap-margin-bottom-small" >
233226 { t ( 'clusters.storage.choose-storage.label' ) }
234- < >
235- < Button
236- id = "storageDescriptionOpener"
237- icon = "hint"
238- design = "Transparent"
239- className = "sap-margin-begin-tiny"
240- onClick = { ( ) => setShowTitleDescription ( true ) }
241- />
242- { createPortal (
243- < Popover
244- opener = "storageDescriptionOpener"
245- open = { showTitleDescription }
246- onClose = { ( ) => setShowTitleDescription ( false ) }
247- placement = "End"
248- >
249- < Text className = "description" >
250- { t ( 'clusters.storage.info' ) }
251- </ Text >
252- </ Popover > ,
253- document . body ,
254- ) }
255- </ >
227+ < HintButton
228+ id = "storageDescriptionOpener"
229+ className = "sap-margin-begin-tiny"
230+ setShowTitleDescription = { setShowTitleDescription }
231+ description = { t ( 'clusters.storage.info' ) }
232+ showTitleDescription = { showTitleDescription }
233+ ariaTitle = { t ( 'clusters.storage.choose-storage.label' ) }
234+ />
256235 </ Title >
257236 < ChooseStorage storage = { storage } setStorage = { setStorage } />
258237 </ div >
0 commit comments