UNPKG

motion-v

Version:

<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>

23 lines (22 loc) 1.22 kB
import { Component, ComponentPublicInstance, DefineComponent, IntrinsicElementAttributes } from 'vue'; import { MotionProps } from './types'; import { Feature } from '../../features'; import { ComponentProps, MotionHTMLAttributes } from '../../types'; type MotionCompProps = { create: <T extends DefineComponent>(T: any, options?: MotionCreateOptions) => DefineComponent<Omit<MotionProps<any, unknown>, 'as' | 'asChild'> & ComponentProps<T>>; }; export interface MotionCreateOptions { forwardMotionProps?: boolean; features?: Feature[]; } export declare function checkMotionIsHidden(instance: ComponentPublicInstance): boolean; /** * Creates a motion component from a base component or HTML tag * Caches string-based components for reuse */ export declare function createMotionComponent(component: string | DefineComponent, options?: MotionCreateOptions): Component; type MotionNameSpace = { [K in keyof IntrinsicElementAttributes]: DefineComponent<Omit<MotionProps<K, unknown>, 'as' | 'asChild' | 'motionConfig' | 'layoutGroup'> & MotionHTMLAttributes<K>, 'create'>; } & MotionCompProps; export declare function createMotionComponentWithFeatures(features?: Feature[]): MotionNameSpace; export {};