Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Supporting Keyframes/Animation #399

Closed
aniknafs opened this issue Oct 24, 2018 · 4 comments
Closed

Supporting Keyframes/Animation #399

aniknafs opened this issue Oct 24, 2018 · 4 comments
Assignees
Labels
⚙️ enhancement New feature or request help wanted Extra attention is needed vsts Paired with ticket in vsts

Comments

@aniknafs
Copy link
Member

Feature Request

Problem description

This is just a request for supporting keyframes on Stardust.

Proposed solution

Keyframe animations currently not being supported in Stardust. Since Fela is used, renderKeyframe from Fela could be potentially used to process keyframes passed to any components.

@levithomason levithomason added ⚙️ enhancement New feature or request help wanted Extra attention is needed labels Oct 24, 2018
@levithomason
Copy link
Member

Agreed. We currently have patterns in the Provider for rendering fonts and static styles. The same pattern needs to be applied to keyframes. This would also include adding keyframes to the theme interface.

@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Oct 25, 2018
@mnajdova
Copy link
Contributor

mnajdova commented Nov 1, 2018

Currently the keyframes can be used even inside the styles in the following manner:

const keyframe = props => ({
  from: {
    transform: "rotate(0deg)",
  },
  to: {
    transform: "rotate(360deg)",
  },
})
const IconExampleWIthKeyframe = () => (
    <Icon name="chess rook" circular styles={({theme}) => ({animation: `${theme.renderer.renderKeyframe(keyframe as any, {})} 1s infinite`})} />
)

Not sure if this is sufficient, but until we provide some different API, this is how they can be used.

@aniknafs
Copy link
Member Author

aniknafs commented Nov 1, 2018

Great.. didn't know renderKeyframe is being exported.. although it looks a bit verbose and kinda buried in the theme..

@alinais
Copy link
Contributor

alinais commented Nov 6, 2018

#414

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ enhancement New feature or request help wanted Extra attention is needed vsts Paired with ticket in vsts
Projects
None yet
Development

No branches or pull requests

5 participants