mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
added shared tsconfig package
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from "react";
|
||||
import { withRouter, RouteComponentProps } from "react-router-dom";
|
||||
// @ts-ignore
|
||||
import Markdown from "react-markdown/with-html";
|
||||
import styled from "styled-components";
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
|
||||
@@ -17,9 +17,11 @@ const Spacing = styled.div`
|
||||
padding: 1em;
|
||||
`;
|
||||
|
||||
const RoutingDecorator = story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>;
|
||||
type StoryFn = () => ReactNode;
|
||||
|
||||
const SpacingDecorator = story => <Spacing>{story()}</Spacing>;
|
||||
const RoutingDecorator = (story: StoryFn) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>;
|
||||
|
||||
const SpacingDecorator = (story: StoryFn) => <Spacing>{story()}</Spacing>;
|
||||
|
||||
storiesOf("Buttons|Button", module)
|
||||
.addDecorator(RoutingDecorator)
|
||||
@@ -50,8 +52,9 @@ const buttonStory = (name: string, storyFn: () => ReactElement) => {
|
||||
buttonStory("AddButton", () => <AddButton>Add</AddButton>);
|
||||
buttonStory("CreateButton", () => <CreateButton>Create</CreateButton>);
|
||||
buttonStory("DeleteButton", () => <DeleteButton>Delete</DeleteButton>);
|
||||
buttonStory("DownloadButton", () => (
|
||||
<DownloadButton displayName="Download" disabled={false} url=""></DownloadButton>
|
||||
)).add("Disabled", () => <DownloadButton displayName="Download" disabled={true} url=""></DownloadButton>);
|
||||
buttonStory("DownloadButton", () => <DownloadButton displayName="Download" disabled={false} url="" />).add(
|
||||
"Disabled",
|
||||
() => <DownloadButton displayName="Download" disabled={true} url=""></DownloadButton>
|
||||
);
|
||||
buttonStory("EditButton", () => <EditButton>Edit</EditButton>);
|
||||
buttonStory("SubmitButton", () => <SubmitButton>Submit</SubmitButton>);
|
||||
|
||||
@@ -2,12 +2,12 @@ import React from "react";
|
||||
import { translate, InjectedTranslateProps } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
// @ts-ignore
|
||||
import { Change, Diff as DiffComponent, getChangeKey, Hunk } from "react-diff-view";
|
||||
import { Button, ButtonGroup } from "../buttons";
|
||||
import Tag from "../Tag";
|
||||
import Icon from "../Icon";
|
||||
import { File, Hunk as HunkType, DiffObjectProps } from "./DiffTypes";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
type Props = DiffObjectProps &
|
||||
InjectedTranslateProps & {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
// We place the types here and not in @scm-manager/ui-types,
|
||||
// because they represent not a real scm-manager related type.
|
||||
@@ -19,7 +19,7 @@ export type File = {
|
||||
oldRevision?: string;
|
||||
type: FileChangeType;
|
||||
// TODO does this property exists?
|
||||
isBinary: boolean;
|
||||
isBinary?: boolean;
|
||||
};
|
||||
|
||||
export type Hunk = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { apiClient } from "../apiclient";
|
||||
import ErrorNotification from "../ErrorNotification";
|
||||
// @ts-ignore
|
||||
import parser from "gitdiff-parser";
|
||||
|
||||
import Loading from "../Loading";
|
||||
|
||||
Reference in New Issue
Block a user