apphouse
Version:
Component library for React that uses observable state management and theme-able components.
43 lines (42 loc) • 1.05 kB
TypeScript
import React from 'react';
import { CSSProperties } from 'glamor';
import { ApphouseComponent } from '../component.interfaces';
/**
* Interface for the styles of the Draggable component
*/
export interface DraggableStyles {
container?: CSSProperties;
dragging?: CSSProperties;
}
/**
* Interface for the Draggable component props
*/
export interface DraggableProps extends ApphouseComponent<DraggableStyles> {
/**
* The id of the draggable, must be unique to the app
*/
id: string;
/**
* The index of the draggable item
*/
index: number;
/**
* The function to call when the draggable is dropped
*/
onDrop: () => void;
/**
* Whether the draggable is disabled
* @default false
* @optional
*/
disabled?: boolean;
/**
* The children of the draggable
*/
children: React.ReactNode;
}
/**
* A draggable component
* @param props DraggableProps
*/
export declare const Draggable: (props: DraggableProps) => import("react/jsx-runtime").JSX.Element;