implemented git repository type configuration

This commit is contained in:
Sebastian Sdorra
2018-11-06 07:59:34 +01:00
parent ef23178fad
commit dd95c9c306
22 changed files with 321 additions and 1368 deletions

View File

@@ -4,15 +4,16 @@ import { Help } from "../index";
type Props = {
label?: string,
name?: string,
checked: boolean,
onChange?: boolean => void,
onChange?: (value: boolean, name?: string) => void,
disabled?: boolean,
helpText?: string
};
class Checkbox extends React.Component<Props> {
onCheckboxChange = (event: SyntheticInputEvent<HTMLInputElement>) => {
if (this.props.onChange) {
this.props.onChange(event.target.checked);
this.props.onChange(event.target.checked, this.props.name);
}
};

View File

@@ -5,11 +5,12 @@ import { LabelWithHelpIcon } from "../index";
type Props = {
label?: string,
name?: string,
placeholder?: string,
value?: string,
type?: string,
autofocus?: boolean,
onChange: string => void,
onChange: (value: string, name?: string) => void,
onReturnPressed?: () => void,
validationError: boolean,
errorMessage: string,
@@ -32,7 +33,7 @@ class InputField extends React.Component<Props> {
}
handleInput = (event: SyntheticInputEvent<HTMLInputElement>) => {
this.props.onChange(event.target.value);
this.props.onChange(event.target.value, this.props.name);
};
handleKeyPress = (event: SyntheticKeyboardEvent<HTMLInputElement>) => {