import {Input} from 'material-ui';
import Select from 'react-select';
无论我如何改变边距或填充并将它们放在div中 . 材质UI文本字段或输入相对于其他元素在其顶部具有这个奇怪的空间 . 所以我不能让它们与其他组件水平对齐 . 我相信它是占据空间的输入的空标签 . 这是常见的事情还是我遗漏了一些事情?谢谢 .
<Select
className="min-w-256 inline-block"
name="form-field-name"
placeholder="Item Name"
value={this.state.currentRecord.itemName}
onChange={this.handleItemNameChange}
options={this.state.itemNameList}
/>
<Input
label = {null}
className="max-w-128 inline-block "
id="input-quantity"
value={this.state.currentRecord.quantity}
onChange={this.handleCurrentRecordTextChange('quantity')}
/>
1 回答
组件样式可能会覆盖您的类,如果您要使用全局css,则需要配置Material-UI的样式解决方案 . 结帐https://material-ui.com/customization/overrides/#overriding-with-class-names了解更多信息 .