Skip to content

Commit d8da29b

Browse files
authored
[UI] Cleanup schema item and explorer panel caret alignment (PaloAltoNetworks#624)
* align schema items vertically * adjust caret height and margin * fix linter errors * adjust top alignment for params * add missing clasname
1 parent c9e8643 commit d8da29b

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* ========================================================================== */
77

88
import clsx from "clsx";
9+
910
import { SchemaObject } from "../openapi/types";
1011
import {
1112
createClosingArrayBracket,
@@ -436,6 +437,7 @@ function createAnyOneOfProperty(
436437
className: "schemaItem",
437438
children: [
438439
createDetails({
440+
className: "openapi-markdown__details",
439441
children: [
440442
createDetailsSummary({
441443
children: [

packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Request/_Request.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@
8080
&::before {
8181
margin-right: 0.25rem;
8282
margin-bottom: 0.25rem;
83+
margin-top: 0.25rem;
8384
background-image: var(--openapi-explorer-caret-bg);
8485
border: none !important;
8586
transform: rotate(90deg);
8687
content: "";
87-
height: 0.75rem;
88-
width: 0.75rem;
88+
height: 1rem;
89+
width: 1rem;
8990
}
9091
}
9192

packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/_ParamsItem.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Horizonal line styling for param attributes
99
&::before {
1010
position: absolute;
11-
top: 10px;
11+
top: 5px;
1212
left: 0;
1313
width: 0.7rem;
1414
/* width of horizontal line */

packages/docusaurus-theme-openapi-docs/src/theme/SchemaItem/_SchemaItem.scss

+1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@
8585

8686
.openapi-schema__container {
8787
display: flex;
88+
align-items: center;
8889
}

0 commit comments

Comments
 (0)