fix: improved typing (#174)

This commit is contained in:
Thomas Klein
2019-10-10 22:20:05 +02:00
committed by Juan Picado @jotadeveloper
parent 68b7171de4
commit e0642a9d0d
16 changed files with 37 additions and 30 deletions

View File

@@ -1,11 +1,11 @@
import React from 'react';
import { mount } from 'enzyme';
import { mount, ReactWrapper } from 'enzyme';
import CopyToClipBoard from './CopyToClipBoard';
import { CopyIcon } from './styles';
describe('<CopyToClipBoard /> component', () => {
let wrapper;
let wrapper: ReactWrapper;
beforeEach(() => {
wrapper = mount(<CopyToClipBoard text={'copy text'} />);

View File

@@ -12,7 +12,7 @@ interface Props {
children?: React.ReactNode;
}
const renderText = (text, children): JSX.Element => {
const renderText = (text: string, children: React.ReactNode): JSX.Element => {
if (children) {
return <ClipBoardCopyText>{children}</ClipBoardCopyText>;
}