stylex icon indicating copy to clipboard operation
stylex copied to clipboard

Creating `stylex.keyframes` directly inside `stylex.defineVars` causes an error

Open k14lb3 opened this issue 6 months ago • 1 comments

The problem

This works ...

const blink = stylex.keyframes({
  '0%': {
    opacity: 0,
  },
});

export const animations = stylex.defineVars({
  blink,
});

but this does not (causes Only static values are allowed inside of a stylex.create() call. error) ...

export const animations = stylex.defineVars({
  blink: stylex.keyframes({
    '0%': {
      opacity: 0,
    },
  }),
});

Environment (include versions). Did this work in previous versions?

@stylexjs/[email protected]

k14lb3 avatar Jan 01 '24 16:01 k14lb3