How to use the stylefire.buildStyleProperty function in stylefire

To help you get started, we’ve selected a few stylefire examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github framer / motion / src / motion / utils / use-styles.ts View on Github external
isStatic?: boolean
): CSSProperties => {
    const motionValueStyles: { [key: string]: any } = resolveCurrent(values)
    const transformTemplate = values.getTransformTemplate()

    if (transformTemplate) {
        // If `transform` has been manually set as a string, pass that through the template
        // otherwise pass it forward to Stylefire's style property builder
        motionValueStyles.transform = styleProp.transform
            ? transformTemplate({}, styleProp.transform)
            : transformTemplate
    }

    return {
        ...styleProp,
        ...buildStyleProperty(motionValueStyles, !isStatic),
    }
}
github framer / motion / src / hooks / use-style-attr.ts View on Github external
() => ({
            ...styles,
            ...buildStyleProperty(resolveCurrent(values)),
        }),
        []

stylefire

Performant, simplified stylers for CSS, SVG, path and DOM scroll.

MIT
Latest version published 5 years ago

Package Health Score

61 / 100
Full package analysis