Skip to content

Commit

Permalink
Merge pull request #308 from shuhaib-aot/Feature/added-props-inputfiled
Browse files Browse the repository at this point in the history
Added name prop into input fields
  • Loading branch information
arun-s-aot authored Oct 24, 2024
2 parents 63ce05a + 45d182e commit 5e6aaed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Form, InputGroup } from 'react-bootstrap';
interface FormInputProps {
type?: string;
label?: string;
name? : string;
value?: string;
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
Expand All @@ -24,6 +25,7 @@ interface FormInputProps {

export const FormInput: React.FC<FormInputProps> = ({
type = "text",
name,
label,
value ,
onChange,
Expand Down Expand Up @@ -55,6 +57,7 @@ export const FormInput: React.FC<FormInputProps> = ({
<InputGroup className="custom-form-input-group">
<Form.Control
type={type}
name={name}
value={value}
onChange={onChange}
onBlur={onBlur}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Form, InputGroup } from 'react-bootstrap';
interface FormTextAreaProps {
type?: string;
label?: string;
name?:string;
value?: string;
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
Expand All @@ -27,6 +28,7 @@ interface FormTextAreaProps {
export const FormTextArea = forwardRef<HTMLTextAreaElement, FormTextAreaProps>(({
label,
value = '',
name,
onChange,
onBlur,
placeholder = '',
Expand Down Expand Up @@ -81,6 +83,7 @@ export const FormTextArea = forwardRef<HTMLTextAreaElement, FormTextAreaProps>((
<Form.Control
as="textarea"
ref={combinedRef}
name={name}
value={value}
onChange={onChange}
onBlur={onBlur}
Expand Down
1 change: 1 addition & 0 deletions forms-flow-theme/scss/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@

.input-with-pills {
display: flex !important;
justify-content: flex-start;
flex-wrap: wrap !important;
align-items: center;
padding: var(--spacer-050) var(--spacer-100);
Expand Down

0 comments on commit 5e6aaed

Please sign in to comment.