Skip to content

Commit 5e6aaed

Browse files
authored
Merge pull request #308 from shuhaib-aot/Feature/added-props-inputfiled
Added name prop into input fields
2 parents 63ce05a + 45d182e commit 5e6aaed

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

forms-flow-components/src/components/CustomComponents/FormInput.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Form, InputGroup } from 'react-bootstrap';
44
interface FormInputProps {
55
type?: string;
66
label?: string;
7+
name? : string;
78
value?: string;
89
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
910
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
@@ -24,6 +25,7 @@ interface FormInputProps {
2425

2526
export const FormInput: React.FC<FormInputProps> = ({
2627
type = "text",
28+
name,
2729
label,
2830
value ,
2931
onChange,
@@ -55,6 +57,7 @@ export const FormInput: React.FC<FormInputProps> = ({
5557
<InputGroup className="custom-form-input-group">
5658
<Form.Control
5759
type={type}
60+
name={name}
5861
value={value}
5962
onChange={onChange}
6063
onBlur={onBlur}

forms-flow-components/src/components/CustomComponents/FormTextArea.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Form, InputGroup } from 'react-bootstrap';
44
interface FormTextAreaProps {
55
type?: string;
66
label?: string;
7+
name?:string;
78
value?: string;
89
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
910
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
@@ -27,6 +28,7 @@ interface FormTextAreaProps {
2728
export const FormTextArea = forwardRef<HTMLTextAreaElement, FormTextAreaProps>(({
2829
label,
2930
value = '',
31+
name,
3032
onChange,
3133
onBlur,
3234
placeholder = '',
@@ -81,6 +83,7 @@ export const FormTextArea = forwardRef<HTMLTextAreaElement, FormTextAreaProps>((
8183
<Form.Control
8284
as="textarea"
8385
ref={combinedRef}
86+
name={name}
8487
value={value}
8588
onChange={onChange}
8689
onBlur={onBlur}

forms-flow-theme/scss/_modal.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@
454454

455455
.input-with-pills {
456456
display: flex !important;
457+
justify-content: flex-start;
457458
flex-wrap: wrap !important;
458459
align-items: center;
459460
padding: var(--spacer-050) var(--spacer-100);

0 commit comments

Comments
 (0)