Skip to content

Commit 1591b79

Browse files
committed
Adjusted the margin of the examples tab.
1 parent 5cf38d3 commit 1591b79

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

demo/examples/tests/examples.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ paths:
5858
summary: "name example 2"
5959
description: "name example 2 description"
6060
value: "Jane Smith"
61+
- name: age
62+
description: age example
63+
in: query
64+
schema:
65+
type: number
66+
examples:
67+
example1:
68+
summary: "age example 1"
69+
description: "age example 1 description"
70+
value: 25
71+
example2:
72+
summary: "age example 2"
73+
description: "age example 2 description"
74+
value: 30
6175
responses:
6276
"204":
6377
description: no content

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.openapi-params__list-item {
22
margin: 0 0 0 1rem !important;
33
position: relative;
4-
padding-left: 1rem;
4+
padding: 5px 0 5px 1rem;
55
border-left: thin solid var(--openapi-tree-line-color) !important;
66
margin-top: unset !important;
77

88
// Horizonal line styling for param attributes
99
&::before {
1010
position: absolute;
11-
top: 5px;
11+
top: 10px;
1212
left: 0;
1313
width: 0.7rem;
1414
/* width of horizontal line */
@@ -25,6 +25,18 @@
2525
color: var(--ifm-color-primary);
2626
}
2727
}
28+
29+
.openapi-tabs__schema-container {
30+
> .openapi-tabs__schema-tabs-container {
31+
margin: 0.2rem 0;
32+
}
33+
34+
@layer docusaurus.infima {
35+
> .margin-top--md {
36+
margin-top: 0rem !important;
37+
}
38+
}
39+
}
2840
}
2941

3042
.openapi-schema__type {

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
content: "";
2828
display: inline-block;
2929
}
30+
31+
.openapi-tabs__schema-container {
32+
> .openapi-tabs__schema-tabs-container {
33+
margin: 0.2rem 0;
34+
}
35+
36+
@layer docusaurus.infima {
37+
> .margin-top--md {
38+
margin-top: 0rem !important;
39+
}
40+
}
41+
}
3042
}
3143

3244
.openapi-schema__name {

0 commit comments

Comments
 (0)