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.
API updates, type + lint fixes and in-progress run tests button
- Loading branch information
1 parent
f76d028
commit c2ebeb4
Showing
7 changed files
with
119 additions
and
76 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 +1,32 @@ | ||
import { animation } from "@storybook/design-system"; | ||
import { styled } from "@storybook/theming"; | ||
import { css, styled } from "@storybook/theming"; | ||
|
||
const { rotate360 } = animation; | ||
|
||
export const ProgressIcon = styled.div(({ theme }) => ({ | ||
width: 12, | ||
height: 12, | ||
margin: "3px 6px", | ||
verticalAlign: "top", | ||
display: "inline-block", | ||
export const ProgressIcon = styled.div<{ onButton?: boolean }>( | ||
({ theme }) => ({ | ||
width: 12, | ||
height: 12, | ||
margin: "3px 6px", | ||
verticalAlign: "top", | ||
display: "inline-block", | ||
|
||
animation: `${rotate360} 0.7s linear infinite`, | ||
border: "2px solid transparent", | ||
borderLeftColor: theme.base === "dark" ? "#58faf9" : "#00aaff", | ||
borderBottomColor: "#25ccfd", | ||
borderRightColor: theme.base === "dark" ? "#00aaff" : "#58faf9", | ||
borderRadius: "100%", | ||
cursor: "progress", | ||
transform: "translate3d(0, 0, 0)", | ||
})); | ||
animation: `${rotate360} 0.7s linear infinite`, | ||
border: "2px solid transparent", | ||
borderLeftColor: theme.base === "dark" ? "#58faf9" : "#00aaff", | ||
borderBottomColor: "#25ccfd", | ||
borderRightColor: theme.base === "dark" ? "#00aaff" : "#58faf9", | ||
borderRadius: "100%", | ||
cursor: "progress", | ||
transform: "translate3d(0, 0, 0)", | ||
}), | ||
({ theme, onButton }) => | ||
onButton && | ||
css({ | ||
margin: "0 6px 0 0", | ||
borderWidth: 1, | ||
borderLeftColor: theme.color.lightest, | ||
borderBottomColor: theme.color.lightest, | ||
borderRightColor: theme.color.lightest, | ||
}) | ||
); |
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
Oops, something went wrong.