1
1
import React from 'react' ;
2
2
import { FormFieldGroupExpandable , FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form' ;
3
- import { Button } from '@patternfly/react-core/dist/dynamic/components/Button' ;
4
- import { TrashIcon , PlusCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/' ;
5
3
import KnowledgeQuestionAnswerPairs from '../KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs' ;
6
4
import { SeedExample } from '..' ;
7
5
@@ -13,10 +11,6 @@ interface Props {
13
11
handleQuestionBlur : ( seedExampleIndex : number , questionAndAnswerIndex : number ) => void ;
14
12
handleAnswerInputChange : ( seedExampleIndex : number , questionAndAnswerIndex : number , answerValue : string ) => void ;
15
13
handleAnswerBlur : ( seedExampleIndex : number , questionAndAnswerIndex : number ) => void ;
16
- deleteQuestionAnswerPair : ( seedExampleIndex : number , questionAnswerIndex : number ) => void ;
17
- addQuestionAnswerPair : ( seedExampleIndex : number ) => void ;
18
- addSeedExample : ( ) => void ;
19
- deleteSeedExample : ( seedExampleIndex : number ) => void ;
20
14
}
21
15
22
16
const KnowledgeSeedExample : React . FC < Props > = ( {
@@ -26,11 +20,7 @@ const KnowledgeSeedExample: React.FC<Props> = ({
26
20
handleQuestionInputChange,
27
21
handleQuestionBlur,
28
22
handleAnswerInputChange,
29
- handleAnswerBlur,
30
- deleteQuestionAnswerPair,
31
- addQuestionAnswerPair,
32
- addSeedExample,
33
- deleteSeedExample
23
+ handleAnswerBlur
34
24
} ) => {
35
25
return (
36
26
< FormFieldGroupExpandable
@@ -66,13 +56,6 @@ const KnowledgeSeedExample: React.FC<Props> = ({
66
56
id : 'nested-field-group1-titleText-id'
67
57
} }
68
58
titleDescription = "Please enter context and at least 3 Q& A pairs for the seed example . "
69
- actions = {
70
- ! seedExample . immutable && (
71
- < Button variant = "plain" aria-label = "Remove" onClick = { ( ) => deleteSeedExample ( seedExampleIndex ) } >
72
- < TrashIcon />
73
- </ Button >
74
- )
75
- }
76
59
/ >
77
60
}
78
61
>
@@ -85,14 +68,9 @@ const KnowledgeSeedExample: React.FC<Props> = ({
85
68
handleQuestionBlur = { handleQuestionBlur }
86
69
handleAnswerInputChange = { handleAnswerInputChange }
87
70
handleAnswerBlur = { handleAnswerBlur }
88
- deleteQuestionAnswerPair = { deleteQuestionAnswerPair }
89
- addQuestionAnswerPair = { addQuestionAnswerPair }
90
71
/>
91
72
</ FormFieldGroupExpandable >
92
73
) ) }
93
- < Button variant = "link" onClick = { addSeedExample } >
94
- < PlusCircleIcon /> Add Seed Example
95
- </ Button >
96
74
</ FormFieldGroupExpandable >
97
75
) ;
98
76
} ;
0 commit comments