mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Added type definitions for react-interactive * fix lint errors * change to address suggestions * fix name conflict * add new line to end of files
22 lines
792 B
TypeScript
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;
|