File tree Expand file tree Collapse file tree 3 files changed +22
-22
lines changed
gitbook/src/components/DocumentView/OpenAPI Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @gitbook/react-openapi ' : patch
3+ ' gitbook ' : patch
4+ ---
5+
6+ Fix OpenAPI enum display
Original file line number Diff line number Diff line change 265265
266266/* Schema Enum */
267267.openapi-schema-enum {
268- @apply flex flex-row text-sm leading-relaxed gap-2 flex-wrap text-tint;
269- }
270-
271- .openapi-schema-enum-list {
272- @apply flex flex-row gap-1.5 items-center;
268+ @apply text-sm leading-relaxed max-w-full text-tint;
273269}
274270
275271.openapi-schema-enum-value {
276- @apply text-sm;
272+ @apply text-sm mr-1.5 ;
277273}
278274
279275.openapi-schema-enum-value : first-child {
Original file line number Diff line number Diff line change @@ -275,22 +275,20 @@ function OpenAPISchemaEnum(props: {
275275 }
276276
277277 return (
278- < div className = "openapi-schema-enum" >
279- < span > Available options:</ span >
280- < div className = "openapi-schema-enum-list" >
281- { enumValues . map ( ( item , index ) => (
282- < span key = { index } className = "openapi-schema-enum-value" >
283- < OpenAPICopyButton
284- value = { item . value }
285- label = { item . description }
286- withTooltip = { ! ! item . description }
287- >
288- < code > { `${ item . value } ` } </ code >
289- </ OpenAPICopyButton >
290- </ span >
291- ) ) }
292- </ div >
293- </ div >
278+ < span className = "openapi-schema-enum" >
279+ Available options:{ ' ' }
280+ { enumValues . map ( ( item , index ) => (
281+ < span key = { index } className = "openapi-schema-enum-value" >
282+ < OpenAPICopyButton
283+ value = { item . value }
284+ label = { item . description }
285+ withTooltip = { ! ! item . description }
286+ >
287+ < code > { `${ item . value } ` } </ code >
288+ </ OpenAPICopyButton >
289+ </ span >
290+ ) ) }
291+ </ span >
294292 ) ;
295293}
296294
You can’t perform that action at this time.
0 commit comments