Change AddEntryTo... to single-line component, add className prop to InputField and Autocomplete

This commit is contained in:
Florian Scholdei
2019-11-26 15:59:38 +01:00
parent 702cca59ed
commit b17f03247b
5 changed files with 90 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
import React from "react";
import classNames from "classnames";
import { Async, AsyncCreatable } from "react-select";
import { SelectValue } from "@scm-manager/ui-types";
import LabelWithHelpIcon from "./forms/LabelWithHelpIcon";
@@ -14,6 +15,7 @@ type Props = {
loadingMessage: string;
noOptionsMessage: string;
creatable?: boolean;
className?: string;
};
type State = {};
@@ -53,10 +55,11 @@ class Autocomplete extends React.Component<Props, State> {
loadingMessage,
noOptionsMessage,
loadSuggestions,
creatable
creatable,
className
} = this.props;
return (
<div className="field">
<div className={classNames("field", className)}>
<LabelWithHelpIcon label={label} helpText={helpText} />
<div className="control">
{creatable ? (