new drafty formatting seems to work as expected
This commit is contained in:
+6
-23
@@ -548,38 +548,19 @@ table.permission-editor td.checkbox {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot-form, .bot-form.vlist {
|
.bot-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
background-color: #eee;
|
|
||||||
min-width: 8rem;
|
min-width: 8rem;
|
||||||
}
|
line-height: 2rem;
|
||||||
.bot-form.hlist {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
}
|
||||||
.bot-form div {
|
.bot-form div {
|
||||||
min-height: 2rem;
|
min-height: 2rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
/* Nested bot forms should have not border */
|
|
||||||
.bot-form .bot-form {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Form element with non-interactive content
|
|
||||||
needs padding.
|
|
||||||
*/
|
|
||||||
.bot-form div.dft {
|
|
||||||
padding: 0.25rem 1rem;
|
|
||||||
min-height: 2rem;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bot-form button {
|
.bot-form button {
|
||||||
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #eef;
|
background-color: #eef;
|
||||||
@@ -589,7 +570,9 @@ needs padding.
|
|||||||
height: 2rem;
|
height: 2rem;
|
||||||
line-height: 2rem;
|
line-height: 2rem;
|
||||||
}
|
}
|
||||||
|
.bot-form > div > button {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
.bot-form button:focus, button:hover, button:active {
|
.bot-form button:focus, button:hover, button:active {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
background-color: #e3f2fd;
|
background-color: #e3f2fd;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -163,15 +163,16 @@ function draftyFormatter(style, data, values, key) {
|
|||||||
case 'BN':
|
case 'BN':
|
||||||
// Button
|
// Button
|
||||||
attr.onClick = this.handleFormButtonClick;
|
attr.onClick = this.handleFormButtonClick;
|
||||||
|
// Get text which will be sent back when the button is clicked.
|
||||||
|
attr['data-title'] = (React.Children.map(values, (child) => {return child;}) || [attr.name]).join('');
|
||||||
break;
|
break;
|
||||||
case 'FM':
|
case 'FM':
|
||||||
// Form
|
// Form
|
||||||
attr.className = 'bot-form' + ((data && data.layout) ? ' ' + data.layout : '');
|
attr.className = 'bot-form';
|
||||||
// console.log(data, attr);
|
// console.log(data, attr);
|
||||||
break;
|
break;
|
||||||
case 'FE':
|
case 'FE':
|
||||||
// Form element formatting is dependent on element content.
|
// Form element formatting is dependent on element content.
|
||||||
attr.className = data && data.dftp ? data.dftp : '';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return React.createElement(el, attr, values);
|
return React.createElement(el, attr, values);
|
||||||
|
|||||||
+5
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user