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>

54 lines (53 loc) 1.97 kB
import { MotionProps } from '../motion'; import { AsTag } from '../../types'; export interface GroupProps<T extends AsTag, K, V> extends MotionProps<T, K> { /** * The axis to reorder along. By default, items will be draggable on this axis. * To make draggable on both axes, set `<Reorder.Item drag />` * * @public */ 'axis'?: 'x' | 'y'; /** * A callback to fire with the new value order. For instance, if the values * are provided as a state from `useState`, this could be the set state function. * * @public */ 'onUpdate:values'?: (newOrder: V[]) => void; /** * The latest values state. * * ```jsx * function Component() { * const [items, setItems] = useState([0, 1, 2]) * * return ( * <Reorder.Group values={items} onReorder={setItems}> * {items.map((item) => <Reorder.Item key={item} value={item} />)} * </Reorder.Group> * ) * } * ``` * * @public */ 'values': V[]; } declare const _default: <T, K, V>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & GroupProps<AsTag, K, V>> & import('vue').PublicProps; expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; attrs: any; slots: { default?(_: {}): any; }; emit: {}; }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, { [key: string]: any; }> & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};