Skip to content

Commit b0791c3

Browse files
authored
Add classnames to MethodEndpoint (#541)
1 parent 7a2e961 commit b0791c3

File tree

1 file changed

+4
-1
lines changed
  • packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/MethodEndpoint

1 file changed

+4
-1
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface Props {
4040
function MethodEndpoint({ method, path }: Props) {
4141
return (
4242
<pre
43+
className="openapi-method-endpoint"
4344
style={{
4445
background: "var(--openapi-card-background-color)",
4546
borderRadius: "var(--openapi-card-border-radius)",
@@ -51,7 +52,9 @@ function MethodEndpoint({ method, path }: Props) {
5152
>
5253
{method.toUpperCase()}
5354
</span>{" "}
54-
<span>{path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}</span>
55+
<span className="openapi-method-endpoint__path">
56+
{path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}
57+
</span>
5558
</pre>
5659
);
5760
}

0 commit comments

Comments
 (0)