Skip to content

Commit

Permalink
[Workplace Search] Make Source Group links look like links (#112125)
Browse files Browse the repository at this point in the history
* change group panels into links

* update with new EuiListGroupItemTo component

* fix import

* remove unused prop

* remove unused import

* omit value for boolean true attributes

* make list item self closing

* break props onto new lines
  • Loading branch information
zombieFox authored Sep 15, 2021
1 parent c9bf6a1 commit f27df93
Showing 1 changed file with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiListGroup,
EuiLink,
EuiPanel,
EuiSpacer,
Expand All @@ -29,7 +30,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';

import { EuiPanelTo } from '../../../../shared/react_router_helpers';
import { EuiListGroupItemTo } from '../../../../shared/react_router_helpers';
import { AppLogic } from '../../../app_logic';
import aclImage from '../../../assets/supports_acl.svg';
import { ComponentLoader } from '../../../components/shared/component_loader';
Expand Down Expand Up @@ -234,22 +235,18 @@ export const Overview: React.FC = () => {
<h5>{GROUP_ACCESS_TITLE}</h5>
</EuiTitle>
<EuiSpacer size="s" />
<EuiFlexGroup direction="column" gutterSize="s" data-test-subj="GroupsSummary">
{groups.map((group, index) => (
<EuiFlexItem key={index}>
<EuiPanelTo
hasShadow={false}
color="subdued"
<EuiPanel color="subdued">
<EuiListGroup flush maxWidth={false} data-test-subj="GroupsSummary">
{groups.map((group, index) => (
<EuiListGroupItemTo
label={group.name}
key={index}
to={getGroupPath(group.id)}
data-test-subj="SourceGroupLink"
>
<EuiText size="s" className="eui-textTruncate">
<strong>{group.name}</strong>
</EuiText>
</EuiPanelTo>
</EuiFlexItem>
))}
</EuiFlexGroup>
/>
))}
</EuiListGroup>
</EuiPanel>
</>
);

Expand Down

0 comments on commit f27df93

Please sign in to comment.