diff --git a/scripts/jest/setup/throw_on_console_error.js b/scripts/jest/setup/throw_on_console_error.js
index c6ab41954c1..c6d2464bdbe 100644
--- a/scripts/jest/setup/throw_on_console_error.js
+++ b/scripts/jest/setup/throw_on_console_error.js
@@ -1,6 +1,8 @@
+import { format } from 'util'
+
// Fail if a test ends up `console.error`-ing, e.g. if React logs because of a
// failed prop types check.
-console.error = (message) => {
+console.error = (message, ...rest) => {
// @see https://github.com/emotion-js/emotion/issues/1105
// This error that Emotion throws doesn't apply to Jest, so
// we're just going to straight up ignore the first/nth-child warning
@@ -14,5 +16,5 @@ console.error = (message) => {
return;
}
- throw new Error(message);
+ throw new Error(format(message, ...rest));
};
diff --git a/src-docs/src/views/form_layouts/form_layouts_example.js b/src-docs/src/views/form_layouts/form_layouts_example.js
index 2e697ecb05d..61e1df7912b 100644
--- a/src-docs/src/views/form_layouts/form_layouts_example.js
+++ b/src-docs/src/views/form_layouts/form_layouts_example.js
@@ -25,6 +25,9 @@ const describedFormGroupRatioSource = require('!!raw-loader!./described_form_gro
import FullWidth from './full_width';
const fullWidthSource = require('!!raw-loader!./full_width');
+import FullWidthViaContext from './full_width_via_context';
+const fullWidthViaContextSource = require('!!raw-loader!./full_width_via_context');
+
import Inline from './inline';
const inlineSource = require('!!raw-loader!./inline');
@@ -130,6 +133,31 @@ export const FormLayoutsExample = {
>
+ To set all the row and controls in a form to{' '}
+
+ Any component that supports the fullWidth
prop that
+ is.
+
+ Make sure it is appropriate at all of the widths that the + container can take. There are many situations where a full-width + form is inappropriate. +
+ > + } + > +{description}
: description + }