Skip to content

Commit 804afa6

Browse files
authored
Merge pull request #47 from CAAPIM/DE530873
[DE530873] markdown editor table style issue fixes
2 parents da6e59d + 1f5c6d3 commit 804afa6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

packages/layer7-apihub/src/documentation/Documentation/DocumentView.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,34 @@ const useStyles = makeStyles(
7474
theme => ({
7575
markdown: {
7676
padding: theme.spacing(2),
77+
'& code': {
78+
whiteSpace: 'pre-wrap',
79+
},
80+
'& table': {
81+
fontSize: '14px',
82+
lineHeight: '1.7',
83+
maxWidth: '100%',
84+
overflow: 'auto',
85+
border: '1px solid #f6f6f6',
86+
borderCollapse: 'collapse',
87+
borderSpacing: 0,
88+
boxSizing: 'border-box',
89+
},
90+
'& table th': {
91+
textAlign: 'center',
92+
fontWeight: 700,
93+
border: '1px solid #efefef',
94+
padding: '10px 6px',
95+
backgroundColor: '#f5f7fa',
96+
wordBreak: 'break-word',
97+
},
98+
'& table td': {
99+
border: '1px solid #efefef',
100+
textAlign: 'left',
101+
padding: '10px 15px',
102+
wordBreak: 'break-word',
103+
minWidth: '60px',
104+
},
77105
},
78106
}),
79107
{

packages/layer7-apihub/src/ui/Markdown/MarkdownInput.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ const useStyles = makeStyles(
5959
width: '100%',
6060
height: '40vh',
6161
},
62+
'& code': {
63+
whiteSpace: 'pre-wrap',
64+
},
6265
},
6366
},
6467
{

0 commit comments

Comments
 (0)