framer-motion
Version:
An open source and production-ready motion library for React on the web
28 lines (24 loc) • 606 B
text/typescript
import * as React from "react"
import { MotionProps } from "../types"
import { VisualElement } from "../../render/types"
/**
* @public
*/
export interface FeatureProps extends MotionProps {
visualElement: VisualElement
}
/**
* @public
*/
export interface MotionFeature {
key: string
shouldRender: (props: MotionProps) => boolean
getComponent: (
props: MotionProps
) => React.ComponentType<FeatureProps> | undefined
}
export type RenderComponent<P = {}> = (
Component: string | React.ComponentType<P>,
props: MotionProps,
visualElement: VisualElement
) => any