Reactjs React物料界面和reactstrap表单与按钮新行内联

Reactjs React物料界面和reactstrap表单与按钮新行内联,reactjs,material-ui,reactstrap,Reactjs,Material Ui,Reactstrap,如何将表单元素内联,而将提交按钮放在新行中 import { Button, Form, Label, Input, Card, CardText, CardBody, CardTitle, Col, Badge } from 'reactstrap'; import { FormControlLabel, Checkbox, FormGroup } from '@material-ui/core'; ...

如何将表单元素内联,而将提交按钮放在新行中

import {
    Button,
    Form,
    Label,
    Input,
    Card,
    CardText,
    CardBody,
    CardTitle,
    Col, Badge
} from 'reactstrap';
import { 
    FormControlLabel, Checkbox, FormGroup
} from '@material-ui/core';

...

<Form inline>
    <FormGroup className="mr-10 mb-10">
        <Label for="initLateFee" className="mr-sm-10">Initial Late Fee</Label>
        <Input type="number" name="initLateFee" id="initLateFee" placeholder="0.00" />
    </FormGroup>
    <FormGroup className="mr-10 mb-10">
        <Label for="dailyLateFee" className="mr-sm-10">Daily Late Fee</Label>
        <Input type="number" name="dailyLateFee" id="dailyLateFee" placeholder="0.00" />
    </FormGroup>
    <FormGroup className="mr-10 mb-10">
        <Label for="applyOn" className="mr-sm-10">Apply On Day</Label>
        <Input type="number" name="applyOn" id="applyOn" placeholder="0" />
    </FormGroup>
    <FormGroup className="mr-10 mb-10">
        <Label for="maxLateFee" className="mr-sm-10">Max Late Fee</Label>
        <Input type="number" name="maxLateFee" id="maxLateFee" placeholder="0.00" />
    </FormGroup>
    <div className="row">
        <Button type="submit" color="primary">Update</Button>
    </div>
</Form>
导入{
按钮
形式,
标签,
输入,
卡片
卡片文本,
名片夹,
名片,
上校,徽章
}来自“反应带”;
导入{
FormControlLabel,复选框,FormGroup
}来自“@material ui/core”;
...
初始滞纳金
每日滞纳金
当天申请
最高滞纳金
更新

我希望将“提交”按钮放在新行中,但属于

如果您希望在单个水平行上有多个输入,请使用网格系统

<Form>
  <div className="row">
    <div className="col">
      <FormGroup>
        <Label>First Name</Label>
        <Input name="firstName" />
      </FormGroup>
    </div>
    <div className="col">
      <FormGroup>
        <Label>Last Name</Label>
        <Input name="lastName" />
      </FormGroup>
    </div>
  </div>
  <Button type="submit">
    Submit
  </Button>
</Form>

名字
姓
提交

如果希望在一个水平行上有多个输入,请使用网格系统

<Form>
  <div className="row">
    <div className="col">
      <FormGroup>
        <Label>First Name</Label>
        <Input name="firstName" />
      </FormGroup>
    </div>
    <div className="col">
      <FormGroup>
        <Label>Last Name</Label>
        <Input name="lastName" />
      </FormGroup>
    </div>
  </div>
  <Button type="submit">
    Submit
  </Button>
</Form>

名字
姓
提交

它不起作用。每个输入都在一行中。表单用
包装。您可以尝试将表单组包装在
中,然后用
包装每个单独的输入。这将在一行中显示它们,并自动调整列的大小。您仍然需要
复选框标签以内联方式显示。我希望标签位于输入的顶部,这样标签就不会内联了,明白了。更新了我的答案。它不起作用。每个输入都在一行中。表单用
包装。您可以尝试将表单组包装在
中,然后用
包装每个单独的输入。这将在一行中显示它们,并自动调整列的大小。您仍然需要
复选框标签以内联方式显示。我希望标签位于输入的顶部,这样标签就不会内联了,明白了。更新了我的答案。