generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d586b4c
commit f160bc7
Showing
18 changed files
with
402 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
import { Icon } from "@storybook/design-system"; | ||
import { styled } from "@storybook/theming"; | ||
import React from "react"; | ||
// import React from "react"; | ||
|
||
import { BuildStatus } from "../../constants"; | ||
// import { BuildStatus } from "../../gql/graphql"; | ||
|
||
const StyledIcon = styled(Icon)<{ icon: "passed" | "changed" | "failed" }>(({ icon, theme }) => ({ | ||
width: 12, | ||
height: 12, | ||
margin: "3px 6px", | ||
verticalAlign: "top", | ||
export const StatusIcon = styled(Icon)<{ icon: "passed" | "changed" | "failed" }>( | ||
({ icon, theme }) => ({ | ||
width: 12, | ||
height: 12, | ||
margin: "3px 6px", | ||
verticalAlign: "top", | ||
|
||
color: { | ||
passed: theme.color.positive, | ||
changed: theme.color.warning, | ||
failed: theme.color.negative, | ||
}[icon], | ||
})); | ||
color: { | ||
passed: theme.color.positive, | ||
changed: theme.color.warning, | ||
failed: theme.color.negative, | ||
}[icon], | ||
}) | ||
); | ||
|
||
export const StatusIcon = ({ status }: { status: BuildStatus }) => | ||
({ | ||
[BuildStatus.IN_PROGRESS]: null, | ||
[BuildStatus.PASSED]: <StyledIcon icon="passed" />, | ||
[BuildStatus.PENDING]: <StyledIcon icon="changed" />, | ||
[BuildStatus.ACCEPTED]: <StyledIcon icon="passed" />, | ||
[BuildStatus.DENIED]: <StyledIcon icon="failed" />, | ||
[BuildStatus.BROKEN]: <StyledIcon icon="failed" />, | ||
[BuildStatus.FAILED]: <StyledIcon icon="failed" />, | ||
[BuildStatus.CANCELLED]: <StyledIcon icon="failed" />, | ||
}[status]); | ||
// export const StatusIcon = ({ status }: { status: BuildStatus }) => | ||
// ({ | ||
// [BuildStatus.Announced]: null, | ||
// [BuildStatus.Published]: null, | ||
// [BuildStatus.Prepared]: null, | ||
// [BuildStatus.InProgress]: null, | ||
// [BuildStatus.Passed]: <StyledIcon icon="passed" />, | ||
// [BuildStatus.Pending]: <StyledIcon icon="changed" />, | ||
// [BuildStatus.Accepted]: <StyledIcon icon="passed" />, | ||
// [BuildStatus.Denied]: <StyledIcon icon="failed" />, | ||
// [BuildStatus.Broken]: <StyledIcon icon="failed" />, | ||
// [BuildStatus.Failed]: <StyledIcon icon="failed" />, | ||
// [BuildStatus.Cancelled]: <StyledIcon icon="failed" />, | ||
// }[status]); |
Oops, something went wrong.