Skip to content

Commit

Permalink
Updates TS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetliakov committed Oct 28, 2016
1 parent c44f1eb commit bbd368a
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import * as React from "react";
import { Style, PlainStyle } from "react-motion";
import Base = Mocha.reporters.Base;

export interface BaseProps {
/**
Expand Down Expand Up @@ -32,24 +30,21 @@ export interface ElementDimensions {
*/
export interface AnimationProps {
/**
* Initial animation (default values)
* Enter/Appear animation name
*/
initialAnimation?: PlainStyle;
enter?: string;
/**
* Animate to these values when active
* Leave animation name
*/
enterAnimation?: Style;
leave?: string;
/**
* Animate to these values when inactive
* Enter/Appear animation duration in ms
*/
leaveAnimation?: Style;
enterDuration?: number;
/**
* Callback when calculating animation style. Provide it if you want custom animations
* @param interpolatedStyle interpolated values from enterAnimation/leaveAnimation
* @param dimensions Element dimensions
* @param active will be true if element active
* Leave/Appear animation duration in ms
*/
onAnimationStyle?: (interpolatedStyle: PlainStyle, dimensions: ElementDimensions, active: boolean) => PlainStyle;
leaveDuration?: number;
}

export type SizeType = "mini" | "tiny" | "small" | "medium" | "large" | "big" | "huge" | "massive";
Expand Down Expand Up @@ -2007,10 +2002,6 @@ export class AccordionBody extends React.Component<AccordionBodyProps, any> { }

// <Accordion />
export interface AccordionProps extends BaseProps {
/**
* Pass false to disable animation
*/
animating?: boolean;
/**
* Current visible content. Strings and numbers are accepted
*/
Expand Down

0 comments on commit bbd368a

Please sign in to comment.