@humanspeak/svelte-motion
Version:
Framer Motion for Svelte 5. Declarative motion.<tag> components with AnimatePresence exit animations, gestures (hover, tap, drag, focus, in-view), variants, FLIP layout animations, shared-layout transitions, spring physics, and scroll-linked motion values
21 lines (20 loc) • 798 B
TypeScript
/**
* Converts a style object to a CSS style string.
*
* @deprecated Use `styleString` from `@humanspeak/svelte-motion` instead for reactive styles.
* This function is non-reactive and will not update when values change.
*
* @param obj - Style object with camelCase keys and string/number values
* @returns CSS style string with kebab-case properties and appropriate units
* @example
* ```ts
* // Old (deprecated, non-reactive):
* import { stringifyStyleObject } from '..'
* const style = stringifyStyleObject({ rotate: 45, opacity: 0.5 })
*
* // New (reactive):
* import { styleString } from '@humanspeak/svelte-motion'
* const style = styleString(() => ({ rotate, opacity }))
* ```
*/
export declare const stringifyStyleObject: (obj: Record<string, string | number>) => string;