Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions packages/block-editor/src/components/warning/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ import clsx from 'clsx';
import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { moreVertical } from '@wordpress/icons';
import { useEffect, useRef } from '@wordpress/element';

function Warning( { className, actions, children, secondaryActions } ) {
const alertRef = useRef( null );

useEffect( () => {
if ( null !== alertRef.current ) {
alertRef.current.focus();
}
}, [] );
return (
<div style={ { display: 'contents', all: 'initial' } }>
<div className={ clsx( className, 'block-editor-warning' ) }>
<div
className={ clsx( className, 'block-editor-warning' ) }
tabIndex="0"
>
<div className="block-editor-warning__contents">
<p className="block-editor-warning__message">
<p
className="block-editor-warning__message"
ref={ alertRef }
role="alert"
>
{ children }
</p>

Expand Down
16 changes: 8 additions & 8 deletions packages/upload-media/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
},
"include": [ "src/**/*" ],
"references": [
{ "path": "../api-fetch" },
{ "path": "../blob" },
{ "path": "../compose" },
{ "path": "../data" },
{ "path": "../element" },
{ "path": "../i18n" },
{ "path": "../private-apis" },
{ "path": "../url" }
{ "path": "../api-fetch" },
{ "path": "../blob" },
{ "path": "../compose" },
{ "path": "../data" },
{ "path": "../element" },
{ "path": "../i18n" },
{ "path": "../private-apis" },
{ "path": "../url" }
]
}
Loading