Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Constance <[email protected]>
  • Loading branch information
JasonStoltz and Constance authored Oct 19, 2020
1 parent b231e8c commit 450205a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Key', () => {
copy: jest.fn(),
toggleIsHidden: jest.fn(),
isHidden: true,
text: '*****',
text: 'some-api-key',
};

it('renders', () => {
Expand Down Expand Up @@ -51,6 +51,6 @@ describe('Key', () => {

it('will render the provided text', () => {
const wrapper = shallow(<Key {...props} />);
expect(wrapper.text()).toContain('*****');
expect(wrapper.text()).toContain('some-api-key');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
import React, { useState, ReactElement } from 'react';
import { i18n } from '@kbn/i18n';

interface ChildrenProps {
interface IChildrenProps {
toggle: () => void;
isHidden: boolean;
hiddenText: React.ReactNode;
}

interface Props {
interface IProps {
text: string;
children(props: ChildrenProps): ReactElement;
children(props: IChildrenProps): ReactElement;
}

export const HiddenText: React.FC<Props> = ({ text, children }) => {
export const HiddenText: React.FC<IProps> = ({ text, children }) => {
const [isHidden, toggleIsHidden] = useState(true);

const hiddenLabel = i18n.translate('xpack.enterpriseSearch.hiddenText', {
Expand Down

0 comments on commit 450205a

Please sign in to comment.