How to use the style-value-types.px.transform function in style-value-types

To help you get started, we’ve selected a few style-value-types 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 Popmotion / popmotion / packages / stylefire / src / svg / build.ts View on Github external
function calcOrigin(origin: number | string, offset: number, size: number) {
  return typeof origin === 'string'
    ? origin
    : px.transform(offset + size * origin);
}
github Popmotion / popmotion / packages / stylefire / src / svg / build.ts View on Github external
const progressToPixels = (progress: number, length: number) =>
  px.transform(progress * length);