Skip to content

Commit 74fe7ae

Browse files
authored
fix: let the list of enums break into multiple lines (#153)
If we have a lot of enum values, the layout is broken because the enums are displayed in a single line. This can't be solved using CSS only, as there is no space between the enum values that the browser can break at. We add a spaced and remove the margin instead.
1 parent f7c3b9b commit 74fe7ae

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

library/src/containers/Schemas/SchemaProperties.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ const getEnumHTMLElements = (schema: SchemaWithKey): HTMLElement[] => {
1515
let enumElements: any[] = [];
1616
if (schema.content.enum && schema.content.enum.length) {
1717
enumElements = schema.content.enum.map((value: any, i: number) => (
18-
<span className={bemClasses.element(`enum`)} key={i}>
19-
"{value}"
20-
</span>
18+
<>
19+
{' '}
20+
<span className={bemClasses.element(`enum`)} key={i}>
21+
"{value}"
22+
</span>
23+
</>
2124
));
2225
}
2326

library/src/styles/fiori.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,6 @@
13561356
border-color: #dae1e7;
13571357
border-radius: 0.25rem;
13581358
border-width: 1px;
1359-
margin-left: 0.25rem;
13601359
padding: 0 0.5rem;
13611360
color: #f6993f;
13621361
}

0 commit comments

Comments
 (0)