Skip to content

Commit 0793fca

Browse files
committed
Enhance ApiSummary component by replacing the agent pill with a method icon for endpoints with agents. Update Styles.js to include new styles for the method icon, improving visual representation.
1 parent bc722f9 commit 0793fca

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

src/ApiSummary.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import labelStyles from "@api-components/http-method-label/http-method-label-com
99
import sanitizer from "dompurify";
1010
import "@advanced-rest-client/arc-marked/arc-marked.js";
1111
import "@api-components/api-method-documentation/api-url.js";
12-
import '@advanced-rest-client/icons/arc-icon.js';
12+
import { codegenie } from '@advanced-rest-client/icons/ArcIcons.js';
13+
1314
import styles from "./Styles.js";
1415

1516
/** @typedef {import('lit-element').TemplateResult} TemplateResult */
@@ -633,17 +634,13 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
633634
data-id="${item.id}"
634635
data-shape-type="method"
635636
title="Open method documentation"
636-
>${item.method}</a
637-
>
638-
639-
${item.hasAgent
640-
? html`
641-
<span class="agent-pill" title="Enabled for Agent">
642-
Enabled for Agent
643-
<arc-icon icon="infoOutline" class="info-icon"></arc-icon>
644-
</span>
645-
`
646-
: ''}
637+
>${item.method}
638+
${
639+
item.hasAgent
640+
? html`<span class="method-icon">${codegenie}</span>`
641+
: ""
642+
}
643+
</a>
647644
`;
648645
}
649646

src/Styles.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ export default css`
5656
white-space: nowrap;
5757
}
5858
59+
.method-icon {
60+
display: inline-flex;
61+
width: 13px;
62+
height: 13px;
63+
padding-left: 7px;
64+
fill: var(--http-method-label-post-color, #fff);
65+
}
66+
5967
label.section {
6068
color: var(--arc-font-subhead-color);
6169
font-weight: var(--arc-font-subhead-font-weight);

0 commit comments

Comments
 (0)