UNPKG

next-yak

Version:

next-yak is a CSS-in-JS solution tailored for Next.js that seamlessly combines the expressive power of styled-components syntax with efficient build-time extraction of CSS using Next.js's built-in CSS configuration

30 lines (28 loc) 646 B
import type { keyframes as keyframesInternal } from "../keyframes.js"; /** * Allows to use CSS keyframe animations in a styled or css block * * @usage * * ```tsx * import { styled, keyframes } from "next-yak"; * * const rotate = keyframes` * from { * transform: rotate(0deg); * } * to { * transform: rotate(360deg); * } * `; * * const Spinner = styled.div` * animation: ${rotate} 1s linear infinite; * `; * ``` */ export const keyframes: typeof keyframesInternal = (styles, ...dynamic) => { // the keyframes function is a no-op in the mock // as it has no dynamic runtime behavior but only css return ""; };