fix IntegrationRow to provide children as a single element
flag=none test plan: - specs pass qa risk: low Change-Id: I0fc757a0841ade4f98fc167fd46d76fa6b661208 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274392 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Product-Review: Davis Hyer <dhyer@instructure.com> Reviewed-by: Weston Dransfield <wdransfield@instructure.com> QA-Review: Weston Dransfield <wdransfield@instructure.com>
This commit is contained in:
parent
0a7085aa29
commit
b6dc331acf
|
@ -59,7 +59,6 @@ const ignoredErrors = [
|
|||
/Function components cannot be given refs/,
|
||||
/Functions are not valid as a React child/,
|
||||
/invalid messageType: (notSupported|undefined)/,
|
||||
/Invalid prop `children` of type `array` supplied to `Transition`/,
|
||||
/Invalid prop `children` supplied to `(Option|View)`/,
|
||||
/Invalid prop `editorOptions.plugins` of type `string` supplied to `(ForwardRef|RCEWrapper)`/, // https://instructure.atlassian.net/browse/MAT-453
|
||||
/Invalid prop `editorOptions.toolbar\[0\]` of type `string` supplied to `(ForwardRef|RCEWrapper)`/, // https://instructure.atlassian.net/browse/MAT-453
|
||||
|
|
|
@ -89,30 +89,32 @@ const IntegrationRow = ({
|
|||
expanded={expanded}
|
||||
onToggle={onToggle}
|
||||
>
|
||||
<div role="region" aria-live="polite">
|
||||
{error && !loading && (
|
||||
<Alert variant="error" margin="small">
|
||||
<Text>
|
||||
{error.message ||
|
||||
I18n.t('An error occurred, please try again. Error: %{error}', {error})}
|
||||
</Text>
|
||||
</Alert>
|
||||
)}
|
||||
{((!enabled && !loading) || info) && (
|
||||
<Alert variant={info?.variant || 'info'} margin="small">
|
||||
<Text>
|
||||
{enabled
|
||||
? info?.message || info
|
||||
: I18n.t(
|
||||
'This integration is not enabled. Please enable it to interact with settings.'
|
||||
)}
|
||||
</Text>
|
||||
</Alert>
|
||||
)}
|
||||
</div>
|
||||
<View display="block" padding="small">
|
||||
{children}
|
||||
</View>
|
||||
<>
|
||||
<div role="region" aria-live="polite">
|
||||
{error && !loading && (
|
||||
<Alert variant="error" margin="small">
|
||||
<Text>
|
||||
{error.message ||
|
||||
I18n.t('An error occurred, please try again. Error: %{error}', {error})}
|
||||
</Text>
|
||||
</Alert>
|
||||
)}
|
||||
{((!enabled && !loading) || info) && (
|
||||
<Alert variant={info?.variant || 'info'} margin="small">
|
||||
<Text>
|
||||
{enabled
|
||||
? info?.message || info
|
||||
: I18n.t(
|
||||
'This integration is not enabled. Please enable it to interact with settings.'
|
||||
)}
|
||||
</Text>
|
||||
</Alert>
|
||||
)}
|
||||
</div>
|
||||
<View display="block" padding="small">
|
||||
{children}
|
||||
</View>
|
||||
</>
|
||||
</ToggleGroup>
|
||||
) : (
|
||||
<></>
|
||||
|
|
Loading…
Reference in New Issue