mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
reformat components with prettier
This commit is contained in:
@@ -99,9 +99,7 @@ export default class CardColumn extends React.Component<Props> {
|
||||
<FlexFullHeight className={classNames("media-content", "text-box", "is-flex")}>
|
||||
<div className="is-flex">
|
||||
<ContentLeft className="content">
|
||||
<p className="shorten-text is-marginless">
|
||||
{title}
|
||||
</p>
|
||||
<p className="shorten-text is-marginless">{title}</p>
|
||||
<p className="shorten-text">{description}</p>
|
||||
</ContentLeft>
|
||||
<ContentRight>{contentRight}</ContentRight>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
import { chooseLocale, supportedLocales } from "./DateFromNow";
|
||||
|
||||
describe("test choose locale", () => {
|
||||
|
||||
it("should choose de", () => {
|
||||
const locale = chooseLocale("de_DE", ["de", "en"]);
|
||||
expect(locale).toBe(supportedLocales.de);
|
||||
@@ -45,5 +44,4 @@ describe("test choose locale", () => {
|
||||
const locale = chooseLocale("af", ["af", "be"]);
|
||||
expect(locale).toBe(supportedLocales.en);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ import MarkdownXmlCodeBlock from "./__resources__/markdown-xml-codeblock.md";
|
||||
import MarkdownInlineXml from "./__resources__/markdown-inline-xml.md";
|
||||
import Title from "./layout/Title";
|
||||
import { Subtitle } from "./layout";
|
||||
import {MemoryRouter} from "react-router-dom";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
|
||||
const Spacing = styled.div`
|
||||
padding: 2em;
|
||||
|
||||
@@ -42,4 +42,3 @@ storiesOf("Forms|Checkbox", module)
|
||||
<Checkbox label="Checked but disabled" checked={true} disabled={true} />
|
||||
</Spacing>
|
||||
));
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class Checkbox extends React.Component<Props> {
|
||||
if (title) {
|
||||
return <LabelWithHelpIcon label={title} helpText={helpText} />;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { label, checked, disabled } = this.props;
|
||||
@@ -68,13 +68,7 @@ export default class Checkbox extends React.Component<Props> {
|
||||
but bulma does.
|
||||
// @ts-ignore */}
|
||||
<label className="checkbox" disabled={disabled}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checked}
|
||||
onChange={this.onCheckboxChange}
|
||||
disabled={disabled}
|
||||
/>{" "}
|
||||
{label}
|
||||
<input type="checkbox" checked={checked} onChange={this.onCheckboxChange} disabled={disabled} /> {label}
|
||||
{this.renderHelp()}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,6 @@ import React, { ChangeEvent } from "react";
|
||||
import { Help } from "../index";
|
||||
import styled from "styled-components";
|
||||
|
||||
|
||||
const StyledRadio = styled.label`
|
||||
margin-right: 0.5em;
|
||||
`;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React, {useState} from "react";
|
||||
import React, { useState } from "react";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import styled from "styled-components";
|
||||
import Textarea from "./Textarea";
|
||||
|
||||
@@ -33,7 +33,7 @@ import hitchhiker from "../__resources__/hitchhiker.png";
|
||||
import marvin from "../__resources__/marvin.jpg";
|
||||
import NavLink from "../navigation/NavLink";
|
||||
import ExternalLink from "../navigation/ExternalLink";
|
||||
import {MemoryRouter} from "react-router-dom";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
|
||||
const trillian: Me = {
|
||||
name: "trillian",
|
||||
|
||||
@@ -52,7 +52,7 @@ const PageActionContainer = styled.div`
|
||||
`;
|
||||
|
||||
const MarginLeft = styled.div`
|
||||
margin-left: 0.5rem;
|
||||
margin-left: 0.5rem;
|
||||
`;
|
||||
|
||||
const FlexContainer = styled.div`
|
||||
|
||||
@@ -40,7 +40,7 @@ const Title: FC<Props> = ({ title, preventRefreshingPageTitle, customPageTitle,
|
||||
document.title = title;
|
||||
}
|
||||
}
|
||||
},[title, preventRefreshingPageTitle, customPageTitle]);
|
||||
}, [title, preventRefreshingPageTitle, customPageTitle]);
|
||||
|
||||
if (title) {
|
||||
return <h1 className={classNames("title", className)}>{title}</h1>;
|
||||
|
||||
@@ -34,4 +34,3 @@ export { default as Title } from "./Title";
|
||||
export { default as CustomQueryFlexWrappedColumns } from "./CustomQueryFlexWrappedColumns";
|
||||
export { default as PrimaryContentColumn } from "./PrimaryContentColumn";
|
||||
export { default as SecondaryNavigationColumn } from "./SecondaryNavigationColumn";
|
||||
|
||||
|
||||
@@ -62,7 +62,11 @@ class ConfirmAlert extends React.Component<Props> {
|
||||
<div className="field is-grouped">
|
||||
{buttons.map((button, i) => (
|
||||
<p className="control">
|
||||
<a className={classNames("button", "is-info", button.className)} key={i} onClick={() => this.handleClickButton(button)}>
|
||||
<a
|
||||
className={classNames("button", "is-info", button.className)}
|
||||
key={i}
|
||||
onClick={() => this.handleClickButton(button)}
|
||||
>
|
||||
{button.label}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -36,7 +36,7 @@ export const MenuContext = React.createContext<MenuContext>({
|
||||
setCollapsed() {}
|
||||
});
|
||||
|
||||
export const StateMenuContextProvider: FC = ({children}) => {
|
||||
export const StateMenuContextProvider: FC = ({ children }) => {
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
||||
const context = {
|
||||
|
||||
@@ -26,4 +26,4 @@ export type RoutingProps = {
|
||||
to: string;
|
||||
activeOnlyWhenExact?: boolean;
|
||||
activeWhenMatch?: (route: any) => boolean;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React, {FC} from "react";
|
||||
import React, { FC } from "react";
|
||||
import SubNavigation from "./SubNavigation";
|
||||
import NavLink from "./NavLink";
|
||||
import {RoutingProps} from "./RoutingProps";
|
||||
import { RoutingProps } from "./RoutingProps";
|
||||
|
||||
type Props = RoutingProps & {
|
||||
label: string;
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React, { FC, useContext} from "react";
|
||||
import React, { FC, useContext } from "react";
|
||||
import { Link, useRouteMatch } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
import useMenuContext, {MenuContext} from "./MenuContext";
|
||||
import {RoutingProps} from "./RoutingProps";
|
||||
import useMenuContext, { MenuContext } from "./MenuContext";
|
||||
import { RoutingProps } from "./RoutingProps";
|
||||
|
||||
type Props = RoutingProps & {
|
||||
label: string;
|
||||
|
||||
@@ -291,11 +291,13 @@ class DiffFile extends React.Component<Props, State> {
|
||||
<DiffButton
|
||||
icon={sideBySide ? "align-left" : "columns"}
|
||||
tooltip={t(sideBySide ? "diff.combined" : "diff.sideBySide")}
|
||||
onClick={() => this.toggleSideBySide(() => {
|
||||
if (this.state.sideBySide) {
|
||||
setCollapsed(true);
|
||||
}
|
||||
})}
|
||||
onClick={() =>
|
||||
this.toggleSideBySide(() => {
|
||||
if (this.state.sideBySide) {
|
||||
setCollapsed(true);
|
||||
}
|
||||
})
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</MenuContext.Consumer>
|
||||
|
||||
@@ -32,7 +32,7 @@ import { Binder, BinderContext } from "@scm-manager/ui-extensions";
|
||||
import { Repository } from "@scm-manager/ui-types";
|
||||
import Image from "../Image";
|
||||
import Icon from "../Icon";
|
||||
import {MemoryRouter} from "react-router-dom";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
|
||||
const baseDate = "2020-03-26T12:13:42+02:00";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user