DefinitelyTyped/types/react-interactive/react-interactive-tests.tsx
Daniel Santoro a70a4e352f React interactive (#39068)
* Added type definitions for react-interactive

* fix lint errors

* change to address suggestions

* fix name conflict

* add new line to end of files
2019-10-16 11:30:26 -07:00

22 lines
792 B
TypeScript

import * as React from "react";
import Interactive, { State } from 'react-interactive';
class InteractiveDiv extends React.Component {
private handleInteractiveStateChange(arg0: {prevState: State, nextState: State, event: React.SyntheticEvent}): void {}
private handleClick(e: React.SyntheticEvent): void {}
render() {
return (<Interactive
as="div"
hover={{ color: 'green' }}
active={{ color: 'blue' }}
focus={{ outline: '2px solid green' }}
onStateChange={this.handleInteractiveStateChange}
onClick={this.handleClick}
style={{ fontSize: '16px', padding: '3px', color: 'black' }}
>This is an interactive and focusable div</Interactive>);
}
}
export default InteractiveDiv;