Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update keyframes test with functions #3593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pgonzalez-santiago
Copy link

System:

  • OS: macOS 11.4
  • CPU: (8) x64 Apple M1
  • Memory: 40.66 MB / 16.00 GB
  • Shell: 5.8 - /bin/zsh

Binaries:

  • Node: 14.17.3 - ~/.nvm/versions/node/v14.17.3/bin/node
  • Yarn: 1.19.0 - ~/.nvm/versions/node/v14.17.3/bin/yarn
  • npm: 6.14.13 - ~/Documents/genially/mono-genially/node_modules/.bin/npm

Steps to reproduce

Hi,

This pull request is because I am using the latest version(5.3.1) and although this works:

const animation = keyframes({
  from: { opacity: 0 },
  to: { opacity: 1 }
});

const Animated = styled.div({
  animation: css`
    ${animation} 1s infinite
  `
});

this does not:

const Animated2 = styled.div(({time = 1}) => ({
  animation: css`${animation} ${time}s infinite` 
}))

Reproduction

I was trying it here: Codesandbox example

I saw this was solved in this PR but there are no tests with functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant