Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Nov 9, 2023
1 parent 3fd6bd2 commit 0db85d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src-docs/src/views/list_group/list_group_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export const ListGroupExample = {
Display <strong>EuiListGroupItems</strong> as links by providing an{' '}
<EuiCode>href</EuiCode> value and change their state with the{' '}
<EuiCode>isActive</EuiCode> and <EuiCode>isDisabled</EuiCode>{' '}
properties.</p>
properties.
</p>
<p>
If your link is external or will open in a new tab, you can manually{' '}
set the <EuiCode>external</EuiCode> property. However, just like{' '}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/list_group/list_group_links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const myContent = [
label: 'Fifth link will open in new tab',
href: 'http://www.elastic.co',
iconType: 'crosshairs',
target: '_blank'
target: '_blank',
},
];

Expand Down
5 changes: 1 addition & 4 deletions src/components/list_group/list_group_item.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
*/

import React from 'react';
import { mount } from 'enzyme';

import { fireEvent } from '@testing-library/react';
import { findTestSubject } from '../../test';
import { shouldRenderCustomStyles } from '../../test/internal';
import { requiredProps } from '../../test/required_props';
import { findByTestSubject, queryByTestSubject, render, waitForEuiToolTipVisible } from '../../test/rtl';
import { render, waitForEuiToolTipVisible } from '../../test/rtl';

import { EuiListGroupItem, SIZES, COLORS } from './list_group_item';
import { fa } from '@faker-js/faker';

describe('EuiListGroupItem', () => {
shouldRenderCustomStyles(<EuiListGroupItem label="Label" />);
Expand Down
6 changes: 3 additions & 3 deletions src/components/list_group/list_group_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export const EuiListGroupItem: FunctionComponent<EuiListGroupItemProps> = ({
const euiTheme = useEuiTheme();

const iconStyles = euiListGroupItemIconStyles(euiTheme);

const cssIconStyles = [iconStyles.euiListGroupItem__icon, iconProps?.css];

let iconNode;
Expand Down Expand Up @@ -285,7 +284,8 @@ export const EuiListGroupItem: FunctionComponent<EuiListGroupItemProps> = ({
isClickable && !isDisabled && innerStyles.isClickable,
];

const showExternalLinkIcon = (target === '_blank' && external !== false) || external === true;
const showExternalLinkIcon =
(target === '_blank' && external !== false) || external === true;

const externalLinkIcon = (
<EuiIcon
Expand All @@ -296,7 +296,7 @@ export const EuiListGroupItem: FunctionComponent<EuiListGroupItemProps> = ({
size="s"
css={innerStyles.externalIcon}
type="popout"
data-test-subj='externalLinkIcon'
data-test-subj="externalLinkIcon"
/>
);

Expand Down

0 comments on commit 0db85d0

Please sign in to comment.