Skip to content

Commit

Permalink
cleanup unused component
Browse files Browse the repository at this point in the history
  • Loading branch information
sserrata committed Nov 21, 2024
1 parent 7c25186 commit e178a5e
Showing 1 changed file with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import React from "react";

import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import TabItem from "@theme/TabItem";
import { createDescription } from "docusaurus-plugin-openapi-docs/lib/markdown/createDescription";
Expand Down Expand Up @@ -85,47 +84,6 @@ interface Props {
mimeType: string;
}

// React components
export const ParamsDetails: React.FC<Props> = ({ parameters, type }) => {
const params = parameters?.filter((param) => param?.in === type);

if (!params || params.length === 0) {
return null;
}

return (
<details
className="openapi-markdown__details"
data-collapsed={false}
open={true}
style={{ marginBottom: "1rem" }}
>
<summary>
<h3 className="openapi-markdown__details-summary-header-params">
{`${type.charAt(0).toUpperCase() + type.slice(1)} Parameters`}
</h3>
</summary>
<div>
<ul>
{params.map((param, index) => (
<ParamsItem
key={index}
className="paramsItem"
// @ts-ignore
param={{
...param,
enumDescriptions: Object.entries(
param?.schema?.items?.["x-enumDescriptions"] ?? {}
),
}}
/>
))}
</ul>
</div>
</details>
);
};

export const ResponseHeaders: React.FC<{
responseHeaders?: Record<string, ResponseHeaderProps>;
}> = ({ responseHeaders }) => {
Expand Down

0 comments on commit e178a5e

Please sign in to comment.