This repository was archived by the owner on Apr 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathInlineTextEditing.tsx
More file actions
67 lines (64 loc) · 2.24 KB
/
Copy pathInlineTextEditing.tsx
File metadata and controls
67 lines (64 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Button, ExpandableSection, Form, FormGroup, Grid, GridItem, TextInput } from '@patternfly/react-core';
import { TrashIcon } from '@patternfly/react-icons';
import { FunctionComponent, useState } from 'react';
interface InlineTextEditingProps {
deleteUser: () => void;
}
export const InlineTextEditing: FunctionComponent<InlineTextEditingProps> = (props) => {
const [isExpanded, setIsExpanded] = useState(true);
const onToggle = (_event: React.MouseEvent, isExpanded: boolean) => {
setIsExpanded(isExpanded);
};
return (
<>
<Grid>
<GridItem span={11}>
<ExpandableSection toggleText={"CONTACT"} onToggle={onToggle} isExpanded={isExpanded}>
<Form>
<FormGroup
label="Name"
fieldId="simple-form-tag-01"
>
<TextInput
type="text"
id="simple-form-extension-01"
name="simple-form-extension-01"
aria-describedby="simple-form-extension-01-helper"
placeholder='No contact provided.'
/>
</FormGroup>
<FormGroup
label="Email"
fieldId="simple-form-tag-02"
>
<TextInput
type="text"
id="simple-form-extension-02"
name="simple-form-extension-02"
aria-describedby="simple-form-extension-02-helper"
placeholder='No email provided.'
/>
</FormGroup>
<FormGroup
label="URL"
fieldId="simple-form-tag-03"
>
<TextInput
type="text"
id="simple-form-extension-03"
name="simple-form-extension-03"
aria-describedby="simple-form-extension-03-helper"
placeholder='No URL provided.'
/>
</FormGroup>
</Form>
</ExpandableSection >
</GridItem>
<GridItem span={1}>
<Button variant="link" icon={<TrashIcon />} size="sm" onClick={() => { props.deleteUser }}>
</Button>
</GridItem>
</Grid>
</>
);
};