Skip to content

Commit

Permalink
Add definitions for react-css-transition-replace (DefinitelyTyped#12118)
Browse files Browse the repository at this point in the history
  • Loading branch information
LKay authored and vvakame committed Oct 25, 2016
1 parent 57d9667 commit c080846
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ node_modules

.sublimets
.settings/launch.json
yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// React CSS Transition Replace Test
// ================================================================================
///<reference path="react-css-transition-replace.d.ts"/>
///<reference path="../react/react.d.ts"/>
///<reference path="../react/react-dom.d.ts"/>

// Imports
// --------------------------------------------------------------------------------
import * as React from "react"
import { render } from 'react-dom';
import * as CSSTransitionReplace from "react-css-transition-replace"

render(
<CSSTransitionReplace overflowHidden transitionName="test">
<div>Test</div>
</CSSTransitionReplace>,
document.getElementById("main")
)
23 changes: 23 additions & 0 deletions react-css-transition-replace/react-css-transition-replace.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Type definitions for react-css-transition-replace 2.0.1
// Project: http://marnusw.github.io/react-css-transition-replace/
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference path="../react/react.d.ts" />
/// <reference path="../react/react-addons-css-transition-group.d.ts" />

declare namespace TransitionReplace {
import React = __React

interface CSSTransitionReplaceProps extends React.CSSTransitionGroupProps {
overflowHidden?: boolean
}

type CSSTransitionReplace = React.ComponentClass<CSSTransitionReplaceProps>
}

declare module "react-css-transition-replace" {
var CSSTransitionReplace: TransitionReplace.CSSTransitionReplace
type CSSTransitionReplace = TransitionReplace.CSSTransitionReplace
export = CSSTransitionReplace
}

0 comments on commit c080846

Please sign in to comment.