react-simple-before-after
Version:
A simple yet powerful react component for adding a nice before after image slider to your project.
24 lines (23 loc) • 1.02 kB
TypeScript
import React from 'react';
declare type ChangeEvent = React.ChangeEvent<HTMLInputElement>;
declare type PointerEvent = React.PointerEvent<HTMLDivElement>;
declare type InlineStyle = React.CSSProperties;
interface Props {
beforeImage: string;
afterImage: string;
onChange?: (event: ChangeEvent) => void;
onPointerMove?: (event: PointerEvent) => void;
onPointerEnter?: (event: PointerEvent) => void;
onPointerLeave?: (event: PointerEvent) => void;
pointerMove?: boolean;
className?: string;
beforeClassName?: string;
afterClassName?: string;
buttonClassName?: string;
style?: InlineStyle;
beforeStyle?: InlineStyle;
afterStyle?: InlineStyle;
buttonStyle?: InlineStyle;
}
export declare function BeforeAfter({ beforeImage, afterImage, onChange, onPointerMove, onPointerEnter, onPointerLeave, pointerMove, className, beforeClassName, afterClassName, buttonClassName, style, beforeStyle, afterStyle, buttonStyle }: Props): JSX.Element;
export {};