@types/react-expand-animated
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-expand-animated

Weekly Downloads

3,634

Version

1.0.4

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • types