import { colors } from '@0x/react-shared'; import * as React from 'react'; interface SwapIconProps { swapTokensFn: () => void; } interface SwapIconState { isHovering: boolean; } export class SwapIcon extends React.Component { public constructor(props: SwapIconProps) { super(props); this.state = { isHovering: false, }; } public render(): React.ReactNode { const swapStyles = { color: this.state.isHovering ? colors.amber600 : colors.amber800, fontSize: 50, }; return (
); } private _onToggleHover(isHovering: boolean): void { this.setState({ isHovering, }); } }