Skip to content

Commit

Permalink
Fix all broken types
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Aug 17, 2023
1 parent 5e2f300 commit 2e2cf8d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Badge as BaseBadge } from "@storybook/components";
import { styled } from "@storybook/theming";
import { ReactNode } from "react";

export const Badge: typeof BaseBadge = styled(BaseBadge)<{ children?: ReactNode }>({
// NOTE: The `Badge` exported by `@storybook/components` incorrectly isn't typed to accept children
export const Badge = styled(BaseBadge)<{ children?: ReactNode }>({
padding: "4px 8px",
margin: "0 6px",
});
8 changes: 8 additions & 0 deletions src/gql/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,13 @@ export type Image = {
imageWidth: Scalars['Int']['output'];
};

export type LocalBuildsSpecifierInput = {
/** If set, only return builds with isLocalBuild set to this value */
isLocalBuild?: InputMaybe<Scalars['Boolean']['input']>;
/** If set, return all global builds, and only local builds from this email hash */
localBuildEmailHash?: InputMaybe<Scalars['String']['input']>;
};

export type Mutation = {
__typename?: 'Mutation';
bulkCreateFigmaMetadata: Array<FigmaMetadata>;
Expand Down Expand Up @@ -753,6 +760,7 @@ export type ProjectBranchNamesArgs = {
export type ProjectLastBuildArgs = {
branches?: InputMaybe<Array<Scalars['String']['input']>>;
defaultBranch?: InputMaybe<Scalars['Boolean']['input']>;
localBuilds?: InputMaybe<LocalBuildsSpecifierInput>;
results?: InputMaybe<Array<BuildResult>>;
slug?: InputMaybe<Scalars['String']['input']>;
statuses?: InputMaybe<Array<BuildStatus>>;
Expand Down
8 changes: 7 additions & 1 deletion src/screens/LinkProject/LinkProject.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ export const SelectProject: Story = {
};

export const Linked: Story = {
render: () => <LinkedProject projectId="789" goToNext={action("goToNext")} />,
render: () => (
<LinkedProject
projectId="789"
goToNext={action("goToNext")}
setAccessToken={action("setAccessToken")}
/>
),
parameters: {
...withFigmaDesign(
"https://www.figma.com/file/GFEbCgCVDtbZhngULbw2gP/Visual-testing-in-Storybook?type=design&node-id=330-472759&t=3EAIRe8423CpOQWY-4"
Expand Down
3 changes: 2 additions & 1 deletion src/screens/VisualTests/BuildInfo.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const meta = {
component: BuildInfo,
args: {
isOutdated: false,
runDevBuild: action("runDevBuild"),
startDevBuild: action("startDevBuild"),
isStarting: false,
},
} satisfies Meta<typeof BuildInfo>;

Expand Down
4 changes: 2 additions & 2 deletions src/screens/VisualTests/VisualTests.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ const meta = {
},
storyId: "button--primary",
projectId: "Project:id123",
runDevBuild: action("runDevBuild"),
startDevBuild: action("startDevBuild"),
isStarting: false,
setAccessToken: action("setAccessToken"),
setIsRunning: action("setIsRunning"),
updateBuildStatus: action("updateBuildStatus"),
},
} satisfies Meta<typeof VisualTests>;
Expand Down

0 comments on commit 2e2cf8d

Please sign in to comment.