Skip to content

Commit

Permalink
[#227] Fix bottom margin in horizontal input
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Oct 6, 2024
1 parent ede0a90 commit 4a8e61a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/HorizontalInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {

const renderCheckbox = () => {
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
<Col lgOffset={props.inputOffset} lg={props.inputWidth}>
<FormCheck type="checkbox" ref={ref} {...getInputProps()}>
{props.label}
Expand All @@ -51,7 +51,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {

const renderRadio = () => {
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
<Col lgOffset={props.inputOffset} lg={props.inputWidth}>
<FormCheck type="radio" ref={ref} {...getInputProps()}>
{props.label}
Expand All @@ -64,7 +64,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {
const renderSelect = () => {
// TODO validation
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
{renderLabel()}
<Col lg={props.inputWidth}>
<FormControl as="select" ref={ref} {...getInputProps()}>
Expand All @@ -80,7 +80,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {
const renderAutocomplete = () => {
// TODO validation
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
{renderLabel()}
<Col lg={props.inputWidth}>
<TypeaheadAnswer {...getInputProps()} />
Expand All @@ -93,16 +93,16 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {

const renderLabel = () => {
return props.label ? (
<Col as={FormLabel} lg={props.labelWidth} className="font-weight-bold text-lg-right align-self-center">
<FormLabel column lg={props.labelWidth} className="font-weight-bold text-lg-right align-self-center">
{props.label}
</Col>
</FormLabel>
) : null;
};

const renderTextArea = () => {
// TODO validation
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
{renderLabel()}
<Col lg={props.inputWidth}>
<FormControl as="textarea" style={{ height: "auto" }} ref={ref} {...getInputProps()} />
Expand All @@ -121,7 +121,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {
// TODO validation
const formControl = <FormControl ref={ref} as="input" {...getInputProps()} />;
return (
<FormGroup as={Row}>
<FormGroup as={Row} className="mb-3">
{renderLabel()}
<Col lg={props.inputWidth}>
{props.iconRight ? (
Expand Down

0 comments on commit 4a8e61a

Please sign in to comment.