Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fix style issue when "array of objects" contains another object (#212)
Browse files Browse the repository at this point in the history
* Fix style issue when "array of objects" contains another object

* simplify solution for `array of objects` style bug
  • Loading branch information
0xVolodya authored and erunion committed Jul 26, 2019
1 parent fa557e1 commit b744663
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions example/swagger-files/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@
},
"name": {
"type": "string"
},
"object": {
"type": "object",
"properties": {
"a": {
"type": "string"
}
}
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion packages/api-explorer/api-explorer.css
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ form.rjsf button[disabled] {
padding: 3px 6px;
}

.field.field-array-of-object legend::after {
.field.field-array-of-object > legend::after {
color: rgba(0, 0, 0, 0.6);
content: 'array of objects';
background: #f2f2f2;
Expand All @@ -323,6 +323,18 @@ form.rjsf button[disabled] {
padding: 3px 6px;
}

fieldset[id^='root_array of objects_'] > legend::after {
content: 'object';
color: rgba(0, 0, 0, 0.6);
background: #f2f2f2;
border-radius: 3px;
font-family: 'Proxima Nova', sans-serif;
font-size: 11px;
font-weight: lighter;
margin-left: 10px;
padding: 3px 6px;
}

.field.field-array-of-boolean legend::after {
color: rgba(0, 0, 0, 0.6);
content: 'array of booleans';
Expand Down

0 comments on commit b744663

Please sign in to comment.