Skip to content

Commit

Permalink
Add default transition animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Studio384 committed Jan 30, 2024
1 parent c406694 commit 762046c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/ValkyrieIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ValkyrieIcon({
}
`;

const aiClass = css`
const viClass = css`
height: 1em;
width: 1em;
min-width: 1em;
Expand All @@ -41,6 +41,7 @@ export default function ValkyrieIcon({

const rotateClass = css`
transform: rotate(${rotate}deg);
transition: transform var(--vi-transition-duration, .2s) var(--vi-transition-easing, ease-in-out);
`;

const flipClass = css`
Expand All @@ -53,7 +54,7 @@ export default function ValkyrieIcon({

const spinClass = css`
svg {
animation: ${spinAnimation} var(--ai-animation-duration, 2s) infinite
animation: ${spinAnimation} var(--vi-animation-duration, 2s) infinite
linear;
}
`;
Expand All @@ -62,7 +63,7 @@ export default function ValkyrieIcon({
<span
{...props}
className={cx({
[aiClass]: true,
[viClass]: true,
[rotateClass]: !!rotate,
[flipClass]: !!flip,
[spinClass]: spin
Expand Down

0 comments on commit 762046c

Please sign in to comment.