@@ -33,6 +33,7 @@ import {
3333 ACTION_STATE ,
3434 DEPLOYMENT_WINDOW_TYPE ,
3535 DockerConfigOverrideType ,
36+ DOCUMENTATION ,
3637 RefVariableType ,
3738 SortingOrder ,
3839 TaskErrorObj ,
@@ -119,52 +120,60 @@ export interface CheckboxProps {
119120 children ?: ReactNode
120121}
121122
122- export interface TippyCustomizedProps extends Pick < TippyProps , 'appendTo' > {
123- theme : TippyTheme
124- visible ?: boolean
125- heading ?: ReactNode | string
126- headingInfo ?: ReactNode | string
127- noHeadingBorder ?: boolean
128- infoTextHeading ?: string
129- hideHeading ?: boolean
130- placement ?: TippyProps [ 'placement' ]
131- className ?: string
132- Icon ?: React . FunctionComponent < React . SVGProps < SVGSVGElement > >
133- iconPath ?: string
134- iconClass ?: string
135- iconSize ?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
136- onImageLoadError ?: ( e ) => void
137- onClose ?: ( ) => void
138- infoText ?: React . ReactNode
139- showCloseButton ?: boolean
140- arrow ?: boolean
141- interactive ?: boolean
142- showOnCreate ?: boolean
143- trigger ?: string
144- animation ?: string
145- duration ?: number
146- additionalContent ?: ReactNode
147- documentationLink ?: string
148- documentationLinkText ?: string
149- children : React . ReactElement < any >
150- disableClose ?: boolean
151- }
152-
153- export interface InfoIconTippyProps
123+ export type TippyWithBaseDocLinkTypes < T extends boolean > = {
124+ isExternalLink ?: T
125+ isEnterprise ?: boolean
126+ documentationLink ?: T extends true ? string : keyof typeof DOCUMENTATION
127+ }
128+
129+ export type TippyCustomizedProps < T extends boolean > = Pick < TippyProps , 'appendTo' > &
130+ TippyWithBaseDocLinkTypes < T > & {
131+ theme : TippyTheme
132+ visible ?: boolean
133+ heading ?: ReactNode | string
134+ headingInfo ?: ReactNode | string
135+ noHeadingBorder ?: boolean
136+ infoTextHeading ?: string
137+ hideHeading ?: boolean
138+ placement ?: TippyProps [ 'placement' ]
139+ className ?: string
140+ Icon ?: React . FunctionComponent < React . SVGProps < SVGSVGElement > >
141+ iconPath ?: string
142+ iconClass ?: string
143+ iconSize ?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
144+ onImageLoadError ?: ( e ) => void
145+ onClose ?: ( ) => void
146+ infoText ?: React . ReactNode
147+ showCloseButton ?: boolean
148+ arrow ?: boolean
149+ interactive ?: boolean
150+ showOnCreate ?: boolean
151+ trigger ?: string
152+ animation ?: string
153+ duration ?: number
154+ additionalContent ?: ReactNode
155+ documentationLinkText ?: string
156+ children : React . ReactElement < any >
157+ disableClose ?: boolean
158+ }
159+
160+ export interface InfoIconTippyProps < T extends boolean = false >
154161 extends Pick <
155- TippyCustomizedProps ,
162+ TippyCustomizedProps < T > ,
156163 | 'heading'
157164 | 'infoText'
158165 | 'iconClass'
159- | 'documentationLink'
160166 | 'documentationLinkText'
161167 | 'additionalContent'
162168 | 'placement'
163169 | 'Icon'
164170 | 'headingInfo'
171+ | 'documentationLink'
172+ | 'isEnterprise'
173+ | 'isExternalLink'
165174 > {
166175 dataTestid ?: string
167- children ?: TippyCustomizedProps [ 'children' ]
176+ children ?: TippyCustomizedProps < T > [ 'children' ]
168177 iconClassName ?: string
169178 buttonPadding ?: string
170179}
0 commit comments