forked from sombochea/verdaccio-ui
fix: improved typing (#174)
This commit is contained in:
committed by
Juan Picado @jotadeveloper
parent
68b7171de4
commit
e0642a9d0d
@@ -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'} />);
|
||||
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user