File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
src/Shared/Components/InvalidYAMLTippy Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
export { default as InvalidYAMLTippyWrapper } from './InvalidYAMLTippyWrapper'
2
2
export { getInvalidTippyContent } from './utils'
3
+ export { InvalidTippyTypeEnum } from './types'
Original file line number Diff line number Diff line change @@ -5,3 +5,12 @@ export interface InvalidYAMLTippyWrapperProps {
5
5
restoreLastSavedYAML ?: ( ) => void
6
6
children : TooltipProps [ 'children' ]
7
7
}
8
+
9
+ export enum InvalidTippyTypeEnum {
10
+ YAML = 'yaml' ,
11
+ JSON = 'json' ,
12
+ }
13
+
14
+ export interface InvalidTippyProps extends Pick < InvalidYAMLTippyWrapperProps , 'parsingError' | 'restoreLastSavedYAML' > {
15
+ type ?: InvalidTippyTypeEnum
16
+ }
Original file line number Diff line number Diff line change 1
1
import { ReactComponent as ICArrowCounterClockwise } from '@Icons/ic-arrow-counter-clockwise.svg'
2
2
import { DEFAULT_INVALID_YAML_ERROR } from './constants'
3
- import { InvalidYAMLTippyWrapperProps } from './types'
3
+ import { InvalidTippyProps , InvalidTippyTypeEnum } from './types'
4
4
5
5
export const getInvalidTippyContent = ( {
6
- type = 'yaml' ,
6
+ type = InvalidTippyTypeEnum . YAML ,
7
7
parsingError,
8
8
restoreLastSavedYAML,
9
- } : Pick < InvalidYAMLTippyWrapperProps , 'parsingError' | 'restoreLastSavedYAML' > & { type ?: 'yaml' | 'json' } ) => {
9
+ } : InvalidTippyProps ) => {
10
10
const text = type . toUpperCase ( )
11
11
12
12
return (
You can’t perform that action at this time.
0 commit comments