mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
Fixed formatting for some of the files
This commit is contained in:
@@ -11,7 +11,7 @@ const styles = {
|
|||||||
float: "left",
|
float: "left",
|
||||||
paddingLeft: "3px",
|
paddingLeft: "3px",
|
||||||
float: "right"
|
float: "right"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -24,9 +24,13 @@ class Help extends React.Component<Props> {
|
|||||||
const { message, classes } = this.props;
|
const { message, classes } = this.props;
|
||||||
const multiline = message.length > 60 ? "is-tooltip-multiline" : "";
|
const multiline = message.length > 60 ? "is-tooltip-multiline" : "";
|
||||||
return (
|
return (
|
||||||
<div className={classNames("tooltip is-tooltip-right", multiline, classes.q)}
|
<div
|
||||||
data-tooltip={message}>
|
className={classNames("tooltip is-tooltip-right", multiline, classes.q)}
|
||||||
<i className={classNames("fa fa-question has-text-info", classes.img)}></i>
|
data-tooltip={message}
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
className={classNames("fa fa-question has-text-info", classes.img)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Help} from "./index";
|
import { Help } from "./index";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
label: string,
|
label: string,
|
||||||
@@ -8,7 +8,6 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class LabelWithHelpIcon extends React.Component<Props> {
|
class LabelWithHelpIcon extends React.Component<Props> {
|
||||||
|
|
||||||
renderLabel = () => {
|
renderLabel = () => {
|
||||||
const label = this.props.label;
|
const label = this.props.label;
|
||||||
if (label) {
|
if (label) {
|
||||||
@@ -19,35 +18,28 @@ class LabelWithHelpIcon extends React.Component<Props> {
|
|||||||
|
|
||||||
renderHelp = () => {
|
renderHelp = () => {
|
||||||
const helpText = this.props.helpText;
|
const helpText = this.props.helpText;
|
||||||
if(helpText){
|
if (helpText) {
|
||||||
return (
|
return (
|
||||||
<div className="control columns is-vcentered">
|
<div className="control columns is-vcentered">
|
||||||
<Help message={helpText} />
|
<Help message={helpText} />
|
||||||
</div>);
|
</div>
|
||||||
}
|
);
|
||||||
else
|
} else return null;
|
||||||
return null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
renderLabelWithHelpIcon = () => {
|
renderLabelWithHelpIcon = () => {
|
||||||
if(this.props.label){
|
if (this.props.label) {
|
||||||
return(
|
return (
|
||||||
<div className="field is-grouped">
|
<div className="field is-grouped">
|
||||||
<div className="control">
|
<div className="control">{this.renderLabel()}</div>
|
||||||
{this.renderLabel()}
|
|
||||||
</div>
|
|
||||||
{this.renderHelp()}
|
{this.renderHelp()}
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
} else return null;
|
||||||
else
|
|
||||||
return null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return this.renderLabelWithHelpIcon();
|
||||||
this.renderLabelWithHelpIcon()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,13 @@ class AddEntryToTableField extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { disabled, buttonLabel, fieldLabel, errorMessage, helpText} = this.props;
|
const {
|
||||||
|
disabled,
|
||||||
|
buttonLabel,
|
||||||
|
fieldLabel,
|
||||||
|
errorMessage,
|
||||||
|
helpText
|
||||||
|
} = this.props;
|
||||||
return (
|
return (
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<InputField
|
<InputField
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Help} from "../index";
|
import { Help } from "../index";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
label?: string,
|
label?: string,
|
||||||
@@ -18,14 +18,13 @@ class Checkbox extends React.Component<Props> {
|
|||||||
|
|
||||||
renderHelp = () => {
|
renderHelp = () => {
|
||||||
const helpText = this.props.helpText;
|
const helpText = this.props.helpText;
|
||||||
if(helpText){
|
if (helpText) {
|
||||||
return (
|
return (
|
||||||
<div className="control columns is-vcentered">
|
<div className="control columns is-vcentered">
|
||||||
<Help message={helpText} />
|
<Help message={helpText} />
|
||||||
</div>);
|
</div>
|
||||||
}
|
);
|
||||||
else
|
} else return null;
|
||||||
return null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import {LabelWithHelpIcon} from "../index";
|
import { LabelWithHelpIcon } from "../index";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
label?: string,
|
label?: string,
|
||||||
@@ -65,10 +65,7 @@ class InputField extends React.Component<Props> {
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<LabelWithHelpIcon
|
<LabelWithHelpIcon label={label} helpText={helpText} />
|
||||||
label={label}
|
|
||||||
helpText={helpText}
|
|
||||||
/>
|
|
||||||
<div className="control">
|
<div className="control">
|
||||||
<input
|
<input
|
||||||
ref={input => {
|
ref={input => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {LabelWithHelpIcon} from "../index";
|
import { LabelWithHelpIcon } from "../index";
|
||||||
|
|
||||||
export type SelectItem = {
|
export type SelectItem = {
|
||||||
value: string,
|
value: string,
|
||||||
@@ -35,10 +35,7 @@ class Select extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<LabelWithHelpIcon
|
<LabelWithHelpIcon label={label} helpText={helpText} />
|
||||||
label={label}
|
|
||||||
helpText={helpText}
|
|
||||||
/>
|
|
||||||
<div className="control select">
|
<div className="control select">
|
||||||
<select
|
<select
|
||||||
ref={input => {
|
ref={input => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {LabelWithHelpIcon} from "../index";
|
import { LabelWithHelpIcon } from "../index";
|
||||||
|
|
||||||
export type SelectItem = {
|
export type SelectItem = {
|
||||||
value: string,
|
value: string,
|
||||||
@@ -27,10 +27,7 @@ class Textarea extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<LabelWithHelpIcon
|
<LabelWithHelpIcon label={label} helpText={helpText} />
|
||||||
label={label}
|
|
||||||
helpText={helpText}
|
|
||||||
/>
|
|
||||||
<div className="control">
|
<div className="control">
|
||||||
<textarea
|
<textarea
|
||||||
className="textarea"
|
className="textarea"
|
||||||
|
|||||||
@@ -19,11 +19,8 @@ export { default as ProtectedRoute } from "./ProtectedRoute.js";
|
|||||||
export { default as Help } from "./Help.js";
|
export { default as Help } from "./Help.js";
|
||||||
export { default as LabelWithHelpIcon } from "./LabelWithHelpIcon.js";
|
export { default as LabelWithHelpIcon } from "./LabelWithHelpIcon.js";
|
||||||
|
|
||||||
|
|
||||||
export { apiClient, NOT_FOUND_ERROR, UNAUTHORIZED_ERROR } from "./apiclient.js";
|
export { apiClient, NOT_FOUND_ERROR, UNAUTHORIZED_ERROR } from "./apiclient.js";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export * from "./buttons";
|
export * from "./buttons";
|
||||||
export * from "./forms";
|
export * from "./forms";
|
||||||
export * from "./layout";
|
export * from "./layout";
|
||||||
|
|||||||
Reference in New Issue
Block a user