MCPcopy Create free account
hub / github.com/chakra-ui/panda / generateKeyframesSpec

Function generateKeyframesSpec

packages/generator/src/spec/keyframes.ts:23–36  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

21}
22
23export const generateKeyframesSpec = (ctx: Context): KeyframeSpec => {
24 const jsxStyleProps = ctx.config.jsxStyleProps
25
26 const keyframes = Object.keys(ctx.config.theme?.keyframes ?? {}).map((name) => ({
27 name,
28 functionExamples: [`css({ animationName: '${name}' })`, `css({ animation: '${name} 1s ease-in-out infinite' })`],
29 jsxExamples: generateKeyframeJsxExamples(name, jsxStyleProps),
30 }))
31
32 return {
33 type: 'keyframes',
34 data: keyframes,
35 }
36}

Callers 1

GeneratorClass · 0.90

Calls 2

keysMethod · 0.80

Tested by

no test coverage detected