1.0.4 • Published 6 months ago

@types/react-expand-animated v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-expand-animated

Summary

This package contains type definitions for react-expand-animated (https://github.com/sonybinhle/react-expand-animated).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-expand-animated.

index.d.ts

// Type definitions for react-expand-animated 1.0
// Project: https://github.com/sonybinhle/react-expand-animated
// Definitions by: Ben Langlois <https://github.com/BenLanglois>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as React from 'react';
import * as CSS from 'csstype';

export interface ExpandProps {
    /**
     * The expanded or collapsed content
     */
    children: React.ReactNode;

    /**
     * When set to true expand the children component otherwise collapse it
     */
    open?: boolean;

    /**
     * Animation duration in ms
     */
    duration?: number;

    /**
     * Css3 Animation's type
     */
    easing?: CSS.Property.TransitionTimingFunction;

    /**
     * Wrapper's className
     */
    className?: string;

    /**
     * Wrapper's tag
     */
    tag?: React.ElementType;

    /**
     * Transition attributes
     */
    transitions?: Array<keyof React.CSSProperties>;

    /**
     * Additional inline-styles on open or close phase
     *
     * @example { open: { marginTop: 100 }, close: { marginTop: 0 } }
     */
    styles?: {
        open?: React.CSSProperties;
        close?: React.CSSProperties;
    };
}

declare const Expand: React.ComponentType<ExpandProps>;
export default Expand;

Additional Details

Credits

These definitions were written by Ben Langlois.

1.0.2

7 months ago

1.0.1

8 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.0

2 years ago